Minor scope opening cleanup
@@ -56,16 +56,17 @@ class ConvEncoder(Encoder):
rate=self.dropout,
training=mode == tf.estimator.ModeKeys.TRAIN)
- cnn_a = self._cnn_stack(inputs, "cnn_a")
- cnn_c = self._cnn_stack(inputs, "cnn_c")
+ with tf.variable_scope("cnn_a"):
+ cnn_a = self._cnn_stack(inputs)
+ with tf.variable_scope("cnn_c"):
+ cnn_c = self._cnn_stack(inputs)
encoder_output = cnn_a
encoder_state = tf.reduce_mean(cnn_c, axis=1)
return (encoder_output, encoder_state, sequence_length)
- def _cnn_stack(self, inputs, scope_name):
- with tf.variable_scope(scope_name):
+ def _cnn_stack(self, inputs):
next_input = inputs
for l in range(self.num_layers):
