Keras error : Expected to see 1 array

Your error comes from the fact that your X for some reason wasn't transformed to a numpy.array. In this your X is treated as a list of rows and this is a reason behind your error message (that it expected one input instead of list which has a number of rows elements). Transformation:

X = numpy.array(X)
Y = numpy.array(Y)

I would check a data loading process because something might go wrong there.

UPDATE:

As it was mentioned in a comment - input_shape need to be changed to input_dim.

UPDATE 2:

In order to keep input_shape one should change to it to input_shape=(200,).


I fixed mine by adding

np.array

to train_X , train_Y , valid_X and valid_Y. For example,

model.fit(np.array(train_X),np.array(train_Y),
          batch_size=32,nb_epoch=20,
          validation_data=(np.array(valid_X),np.array(valid_Y)),
          callbacks=[early_stop])

I got the help from here. This approach is likely to have a slow run because all data features will have to be converted to numpy arrays and it could be a lot of work for your system.