I am doing a toy example with mushroom dataset to learn class embedding with keras:
I am trying to embed a single feature:
inputs = Input(shape=[1])
emb = Embedding(input_dim=cap_shape_dummy.shape[1], output_dim=3)(inputs)
output = Dense(units=1,activation='sigmoid')(emb)
model = Model(inputs=inputs,outputs=output)
However I always receive the same error when I try to fit the model:
Error when checking target: expected dense_2 to have 3 dimensions, but got array with shape (8124, 1)
Am I doing anything wrong? Did I miss anything with category embedding?
Thanks.