Closed xun468 closed 5 years ago
Are you asking why true labels are made that way?
x = np.random.randint(0, n_labels, size=(n, t))
y = np.expand_dims(x, axis=-1)
The only reason why I could not instead just set y=x
is that sparse_categorical_crossentropy
expects labels_true shape (batch, time, 1) and not (batch, time)
While trying to implement a version of your code I noticed that your y outputs seem to be the desired sequence but transposed. If that is correct could you explain why? I am curious since I have not seen that before while looking up seq2seq stuff.