My learning model is as follows (using Keras).
model = Sequential()
model.add(Dense(100, activation='relu', input_shape = (X_train.shape[0],)))
model.add(Dense(500, activation='relu'))
model.add(Dense(2, activation='softmax'))
My input data X_train is an array of shape (180,) and the corresponding y_train containing labels is also an array of shape (180,). I tried to compile and fit the model as follows.
model.compile(loss="sparse_categorical_crossentropy",
optimizer="adam",
metrics=['accuracy'])
model.fit(X_train, y_train, epochs = 200)
When I run the model.fit(), I encountered the following error:
ValueError: Error when checking input: expected dense_1_input to have
shape (180,) but got array with shape (1,)
I'm not sure what I'm doing wrong since I'm pretty new to deep learning. Any help is appreciated. Thanks.
X_train