python - ValueError: Error when checking input: expected dense_6_input to have 3 dimensions, but got array with shape -
i'm receiving error keras:
valueerror: error when checking input: expected dense_6_input have 3 dimensions, got array shape (55, 72)
on
model.fit(x.values, y.values, nb_epoch=1000, batch_size=16,verbose=0)
this code:
keras.models import sequential keras.layers import dense, activation model = sequential([ dense(32, input_shape=x.values.shape), activation('relu'), dense(10), activation('softmax'), ]) model.compile(loss='mse', optimizer='rmsprop') model.fit(x.values, y.values, nb_epoch=1000, batch_size=16,verbose=0)
x has shape of (55, 72)
how can fix , dense_6_input?
the problem here:
dense(32, input_shape=x.values.shape)
don't set input_shape shape of input values array, input_shape not contain samples dimension. want should be:
dense(32, input_shape=(72,)),
then should able call fit without issues.
Comments
Post a Comment