title: Error when checking input: expected conv2d_27_input to have 4 dimensions, but got array with shape (55000, 28, 28)
body: <p>hi i'm trying to use cnn on fashion mnist data
  there are 5200 images 28*28 in grayscale so i used a 2D cnn
  here is my code:</p>
  
  <pre><code>fashion_mnist=keras.datasets.fashion_mnist
  (xtrain,ytrain),(xtest,ytest)=fashion_mnist.load_data()
  xvalid,xtrain=xtrain[:5000]/255.0,xtrain[5000:]/255.0
  yvalid,ytrain=ytrain[:5000],ytrain[5000:]
  
  defaultcon=partial(keras.layers.Conv2D,kernel_size=3,activation='relu',padding="SAME")
  
  model=keras.models.Sequential([
                             defaultcon(filters=64,kernel_size=7,input_shape=[28,28,1]),
                             keras.layers.MaxPooling2D(pool_size=2),
                             defaultcon(filters=128),
                             defaultcon(filters=128),
                             keras.layers.MaxPooling2D(pool_size=2),
                             defaultcon(filters=256),
                             defaultcon(filters=256),
                             keras.layers.MaxPooling2D(pool_size=2),
                             keras.layers.Flatten(),
                             keras.layers.Dense(units=128,activation='relu'),
                             keras.layers.Dropout(0.5),
                             keras.layers.Dense(units=64,activation='relu'),
                             keras.layers.Dropout(0.5),
                             keras.layers.Dense(units=10,activation='softmax'),
  
  ])
  model.compile(optimizer='sgd',loss="sparse_categorical_crossentropy", metrics=["accuracy"])
  history=model.fit(xtrain,ytrain,epochs=30,validation_data=(xvalid,yvalid))
  </code></pre>
  
  <p>but i get Error when checking input: expected conv2d_27_input to have 4 dimensions, but got array with shape (55000, 28, 28)
  how expected to get 4D ?</p>