sequence to sequence model learning notes

about the output

No matter what you do, in the end, you’ll always have a Dense layer that converts those float numbers into an integer ID of a word.


decoder_outputs = layers.Dense(vocab_size, activation="softmax")(x)

about the model Input/Output structure

transformer = keras.Model(
    [encoder_inputs, decoder_inputs], decoder_outputs, name="transformer"
)

encoder_inputs means the source sentence, like “hi you”

decoder_inputs means the un-complete target sentence, like “HI”

decoder_outputs means the next target word prediction, like “YOU”