title: ValueError: Input 0 of layer conv2d is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (None, 400, 50)
body: <p>I keep on getting this error related to the input shape. Any help would be very appreciated. Thank you!</p>
  <pre><code>def deep_model():
  
      model = Sequential()
      model.add(keras.layers.Conv1D(filters=50, kernel_size=9, strides=1, padding='same', 
                 batch_input_shape=(None, Length, 4), activation='relu'))
  
      model.add(keras.layers.Conv2D(32, kernel_size =(9, 9), strides =(1, 1),
                      activation ='relu'))
      model.add(MaxPooling2D(pool_size =(2, 2), strides =(2, 2)))
      model.add(keras.layers.Conv2D(64, (9, 9), activation ='relu'))
      model.add(MaxPooling2D(pool_size =(2, 2)))
      model.add(Flatten())
      model.add(Dense(100, activation ='relu'))
      model.add(Dropout(0.3))
      model.add(Dense(3, activation ='softmax'))
  
      # training the model
      model.compile(loss = keras.losses.categorical_crossentropy,
                  optimizer = keras.optimizers.SGD(lr = 0.01),
                  metrics =['accuracy'])
  
      return model
  
  x_train = x_train.reshape(-1, 400, 4)
  </code></pre>
  <blockquote>
  <p>raise ValueError('Input ' + str(input_index) + ' of layer ' +
  ValueError: Input 0 of layer conv2d is incompatible with the layer: :
  expected min_ndim=4, found ndim=3. Full shape received: (None, 400,
  50)</p>
  </blockquote>
  <p>I tried to reshape the x_train also but got this error:</p>
  <blockquote>
  <p>x_train = x_train.reshape(-1, 400, 400, 4) ValueError: cannot reshape
  array of size 43200000 into shape (400,400,4)</p>
  </blockquote>