title: CNN: Error when checking input: expected dense to have 2 dimensions, but got array with shape (391, 605, 700, 3)
body: <p>I'm getting a list of images to train my CNN. </p>
  
  <pre class="lang-py prettyprint-override"><code>model = Sequential()
  model.add(Dense(32, activation='tanh', input_dim=100))
  model.add(Dense(1, activation='sigmoid'))
  model.compile(optimizer='rmsprop',
                loss='binary_crossentropy',
                metrics=['accuracy'])
  
  data, labels = ReadImages(TRAIN_DIR) 
  
  # Train the model, iterating on the data in batches of 32 samples
  model.fit(np.array(data), np.array(labels), epochs=10, batch_size=32)
  </code></pre>
  
  <p>But I faced this error: </p>
  
  <p>'with shape ' + str(data_shape))</p>
  
  <p>ValueError: Error when checking input: expected dense_1_input to have 2 dimensions, but got array with shape (391, 605, 700, 3)</p>