ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: [None, 25, 25, 1] I am trying to use conv1D but getting that error.
My dataset's is batched and has a shape of [None, 25, 25, 1]
I am using input_shape=(25,25)
I am not able to figure out what should I change so I can get it to work.
My model:
model = Sequential()
model.add(Conv1D(32, kernel_size=3, activation='relu', input_shape=(25,25))
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
I have solved the problem by changing the shape of my dataset using:
tf.reshape(data, [25, 25])