title: ValueError: Error when checking target: expected max_pooling2d_1 to have 4 dimensions, but got array with shape (61, 1)
body: <p>I am working in keras tensorflow backend on Windows 10.
  I am not able to interpret the  meaning of the error </p>
  
  <h1>Here is a snippet of my code</h1>
  
  
  
  <pre class="lang-python prettyprint-override"><code>{
  model = Sequential([
      #Dense(32, input_shape=(1080,1920,2)),
      Dense(32, input_shape=(250,250, 3)),
      #Dense(32, input_shape=(3,1080,1920,2)),
      Activation('relu'),
      Dense(10),
      Activation('softmax'),
      Dropout(0.02),
  ])
  
  layer = Dropout(0.02)
  
  #further layers:
  model.add(Dense(units=3)) #hidden layer 1
  model.add(Dense(units=1)) #output layer
  model.add(Conv2D(3, (3, 3)))
  model.add(MaxPooling2D(pool_size=(2, 2),strides=None,padding='valid', data_format=None))
  
  model.compile(loss=losses.mean_squared_error, optimizer='sgd')
  
  sgd = optimizers.SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
  
  
  test_generator = ImageDataGenerator()
  
  validation_generator = test_generator.flow_from_directory(
      'human_faces/validation',
      target_size=(250,250),
      batch_size=3,
      class_mode=None,classes=0)
  
  
  model.fit_generator(
      train_generator,
      steps_per_epoch=1,## batch_size,
      #steps_per_epoch=3,
      epochs=5,
      validation_data=validation_generator,
      #  validation_steps=61 )  # batch_size)
      validation_steps=1)
  
  }
  </code></pre>
  
  <h1>My error:</h1>
  
  <blockquote>
    <p>File "C:/Users/Owner/PycharmProjects/untitled1/work.py", line 89, in
    
        validation_steps=1) ValueError: Error when checking target: expected max_pooling2d_1 to have 4 dimensions, but got array with
    shape (61, 1)</p>
  </blockquote>