huang
huang

Reputation: 1167

WARNING:tensorflow:Model was constructed with shape (None, 188) for input, but it was called on an input with incompatible shape (188,)

Can someone help me to fix this? tensorflow is really annoying.

WARNING:tensorflow:Model was constructed with shape (None, 188) for input KerasTensor(type_spec=TensorSpec(shape=(None, 188), dtype=tf.float32, name='input_9'), name='input_9', description="created by layer 'input_9'"), but it was called on an input with incompatible shape (188,).

enter image description here

enter image description here

Upvotes: 1

Views: 753

Answers (1)

AloneTogether
AloneTogether

Reputation: 26698

You seem to be missing a dimension. Try batching your data:

train_set = train_set.batch(32)

Upvotes: 3

Related Questions