Cleanup scopes
@@ -93,7 +93,6 @@ def multi_head_attention(num_heads,
input_dim = keys.get_shape().as_list()[-1]
head_dim = input_dim / num_heads
- with tf.variable_scope("multi_head"):
for i in range(num_heads):
with tf.variable_scope("head_" + str(i)):
# Project queries, keys and values to different and smaller subspaces.
@@ -138,7 +137,6 @@ def feed_forward(x, inner_dim):
"""
input_dim = x.get_shape().as_list()[-1]
- with tf.variable_scope("ffn"):
inner = tf.layers.dense(
inputs=x,
units=inner_dim,
