diff --git a/src/TensorFlowNET.Keras/Layers/LayersApi.cs b/src/TensorFlowNET.Keras/Layers/LayersApi.cs index c6929a4b..91e5e85a 100644 --- a/src/TensorFlowNET.Keras/Layers/LayersApi.cs +++ b/src/TensorFlowNET.Keras/Layers/LayersApi.cs @@ -85,7 +85,7 @@ namespace Tensorflow.Keras.Layers /// Initializer for the bias vector (see keras.initializers). /// A tensor of rank 3 representing activation(conv1d(inputs, kernel) + bias). public Conv1D Conv1D(int filters, - Shape? kernel_size = null, + Shape kernel_size, int? strides = null, string padding = "valid", string data_format = null, diff --git a/test/TensorFlowNET.Keras.UnitTest/Layers/Layers.Convolution.Test.cs b/test/TensorFlowNET.Keras.UnitTest/Layers/Layers.Convolution.Test.cs index 81fb3ea1..fbe4330c 100644 --- a/test/TensorFlowNET.Keras.UnitTest/Layers/Layers.Convolution.Test.cs +++ b/test/TensorFlowNET.Keras.UnitTest/Layers/Layers.Convolution.Test.cs @@ -14,14 +14,12 @@ namespace TensorFlowNET.Keras.UnitTest { var filters = 8; - var conv = keras.layers.Conv1D(filters, activation: "linear"); + var conv = keras.layers.Conv1D(filters, kernel_size: 3, activation: "linear"); var x = np.arange(256.0f).reshape((8, 8, 4)); var y = conv.Apply(x); - Assert.AreEqual(3, y.shape.ndim); - Assert.AreEqual(x.dims[0], y.shape[0]); - Assert.AreEqual(x.dims[1] - 4, y.shape[1]); + Assert.AreEqual(y.shape, (8, 6, 8)); Assert.AreEqual(filters, y.shape[2]); }