Not sure if this is the best place to post!
I’ve worked with this tut for a couple hours and I found the following bugs:
- The tutorial below contains a broken link under “View on GitHub”.
- The
collate_fn=generate_batch
is broken astorch.nn.utils.rnn.pad_sequence
swaps the dimensions of data, yielding batches where the 0th element is full of<sos>
tokens etc. The correct way would be to usebatch_first=True
inpad_sequence
.
Hope it helps!