Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ValueError: Error when checking target: expected embedding_1 to have shape (55, 50) but got array with shape (55, 16)
- batch_size=16
- words = 20000
- units = 50
- tokens_per_sentence= 55
- print (x.shape)
- x_shape = x.shape
- model = Sequential()
- model.add(Embedding(words, units,input_length=tokens_per_sentence, batch_size=batch_size , input_shape=x_shape[1:]))
- model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
- model.train_on_batch(x, y)
Add Comment
Please, Sign In to add comment