tell me how to roughly assemble the model
input data
Xt = [# only one 1 in an element of 5 values
[[0,0,0,0,1], [0,0,1,0,0], [0,0,0,0,1], [1,0,0,0,0], [ 0,0,1,0,0], [0,0,1,0,0]], 1 (6 elements)
… …
[[0,0,0,0,1], [0,0,0,0,1], [0,0,0,0,1], [0,0,0,0,1], [ 0,0,0,0,1], [0,0,1,0,0]] 500 (6 elements)
Yt = [# only one 1 in an element of 5 values
[[0,0,0,0,1], [0,0,1,0,0], [0,0,0,0,1]], 1 (3 elements)
… …
[[0,0,0,0,1], [0,0,0,0,1], [0,0,0,0,1]] 500 (3 elements)
DOES NOT WORK
act = ‘relu’
model = Sequential ()
model.add (LSTM (6, activation = act, batch_input_shape = (500, 6, 5), return_sequences = True))
model.add (LSTM (3, activation = ‘softmax’)) # assuming this is the last layer
model.compile (optimizer = ‘adam’, loss = ‘categorical_crossentropy’, metrics = [‘acc’])
md = model.fit (Xt, Yt, epochs = 500, batch_size = 500, verbose = 1, shuffle = False)
ValueError: Shapes (500, 6, 5) and (500, 3) are incompatible