I have a training dataset like this (the number of items in the main list is 211 and the number of numbers in every array is 185):
[np.array([2, 3, 4, ... 5, 4, 6]) ... np.array([3, 4, 5, ... 3, 4, 5])]
and I use this code to train the model:
def create_model():
model = keras.Sequential([
keras.layers.Flatten(input_shape=(211, 185), name="Input"),
keras.layers.Dense(211, activation='relu', name="Hidden_Layer_1"),
keras.layers.Dense(185, activation='relu', name="Hidden_Layer_2"),
keras.layers.Dense(1, activation='softmax', name="Output"),
])
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
return model
but whenever I fit it like this:
model.fit(x=training_data, y=training_labels, epochs=10, validation_data = [training_data,training_labels])
it returns this error:
ValueError: Layer sequential expects 1 inputs, but it received 211 input tensors.
What could possibly be the problem?