Keras Sequential without providing input shape
问题 I currently have a keras model that looks like this: model = keras.Sequential() model.add(keras.layers.Dense(100, activation=tf.nn.relu)) model.add(keras.layers.Dense(100, activation=tf.nn.relu)) model.add(keras.layers.Dense(len(labels), activation=tf.nn.softmax)) The Keras documentation tells me: The model needs to know what input shape it should expect. For this reason, the first layer in a Sequential model (and only the first, because following layers can do automatic shape inference)