During training the decoder is fed the correct previous word, not its own guess. This is teacher forcing. The inputs are the targets shifted right by one position, with a begin-of-sentence token at the front.
Implement decoder_inputs(targets, bos), which returns [bos] + targets[:-1].
Concatenate the start token with all targets except the final one.
No results yet
Run your code to check it against the examples, or submit to run every test.