title: Error when checking input: expected conv2d_19_input to have 4 dimensions, but got array with shape (274, 1) deep learning
body: <p>this is my code with error</p>
  
  <pre><code>def createModel():   
  model = Sequential()
  # first set of CONV =&gt; RELU =&gt; MAX POOL layers
  model.add(Conv2D(32, (3, 3), padding='same', activation='relu', input_shape=inputShape))
  model.add(Conv2D(32, (3, 3), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Dropout(0.25))
  
  model.add(Conv2D(64, (3, 3), padding='same', activation='relu'))
  model.add(Conv2D(64, (3, 3), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Dropout(0.25))
  
  model.add(Conv2D(64, (3, 3), padding='same', activation='relu'))
  model.add(Conv2D(64, (3, 3), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Dropout(0.25))
  
  model.add(Flatten())
  model.add(Dense(512, activation='relu'))
  model.add(Dropout(0.5))
  model.add(Dense(output_dim=NUM_CLASSES, activation='softmax'))
  # returns our fully constructed deep learning + Keras image classifier 
  opt = Adam(lr=INIT_LR, decay=INIT_LR / EPOCHS)
  # use binary_crossentropy if there are two classes
  model.compile(loss="categorical_crossentropy", optimizer=opt, metrics=["accuracy"])
  return model
  </code></pre>
  
  <blockquote>
    <p>ValueError: Error when checking input: expected conv2d_19_input to have 4 dimensions, but got array with shape (274, 1)</p>
  </blockquote>