Error when checking : expected dense_1_input to have shape (None, 5) but got array with shape (200, 1)
I had a very similar issue when executing predict/predict_classes;

  ...
    classes = model.predict(XpredictInputData) 
  File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 1006, in predict
    return self.model.predict(x, batch_size=batch_size, verbose=verbose)
  File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1772, in predict
    check_batch_axis=False)
  File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 153, in _standardize_input_data
    str(array.shape))
ValueError: Error when checking : expected dense_1_input to have shape (None, 100) but got array with shape (100, 1)


The problem was occurring because the input array to keras predict was 1 dimensional (caused by a combination of a) numpy.genfromtxt producing a 1d array from a 1 row data file and b) a broadcasting failure). Keras predict appears to require a two dimensional array, even if there is only 1 prediction to be made.

I solved the issue by adding the following check before executing predict;

if (XpredictInputData.ndim == 1):
    XpredictInputData = numpy.array([XpredictInputData])