1

I have input shape

(642, 193, 1)

I am passing to this layer

Conv1D(filters=64, kernel_size=3, input_shape=X_train.shape))

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
conv1d (Conv1D)              (None, 642, 191, 64)      256       
=================================================================

and I am passing this shape to

AveragePooling1D(pool_size=2)

But I get the error

expected ndim=3, found ndim=4. Full shape received: (None, 641, 191, 64)

I can't figure it out. Can anybody help me?

Hiba Rehman
  • 127
  • 2
  • 9
  • Change your input shape to: `Conv1D(filters=64, kernel_size=3, input_shape=(193, 1))`. See also: https://stackoverflow.com/questions/69591717/how-is-the-keras-conv1d-input-specified-i-seem-to-be-lacking-a-dimension/69594400#69594400 – AloneTogether Jun 29 '22 at 07:59

0 Answers0