Use tf.layers.conv1d in ConvEncoder
@@ -56,12 +56,11 @@ class ConvEncoder(Encoder):
next_input = inputs
for l in range(self.num_layers):
- outputs = tf.contrib.layers.conv2d(
- inputs=next_input,
- num_outputs=self.num_units,
- kernel_size=self.kernel_size,
- padding="SAME",
- activation_fn=None)
+ outputs = tf.layers.conv1d(
+ next_input,
+ self.num_units,
+ self.kernel_size,
+ padding="same")
# Add residual connections past the first layer.
if l > 0:
