I am facing the problem with input shape of model for categorical classifier
x y
[1,2,3] [0]
[2,3,5] [1]
[2,1,6] [2]
[1,2,3] [0]
[2,3,5] [0]
[2,1,6] [2]
then i changed the y label into categorical as
y
[1,0,0]
[0,1,0]
[0,0,1]
[1,0,0]
[1,0,0]
[0,0,1]
and my x_train shape is (6000,3) y_train shape is (6000,3) x_test shape is (2000,3) y_test shape is (2000,3)
i tried this model and getting value error
model=sequential()
model.add(Dense(1, input_shape(3,), activation="softmax"))
model.compile(Adam(lr=0.5), 'categorical_crossentropy', metrics=['accuracy'])
model.fit(X_train,y_train,epochs=50, verbose=1)
Value error: Error when checking target: expected dense_1 to have shape(None,1) but got array with shape (6000,3)
i dont understand this error. help me to sort out this