Learn Before
Code
Machine Translation Dataset Iterator
To facilitate model training and evaluation, a data iterator is defined for the machine translation dataset. This iterator, often implemented as a get_dataloader method, uses a boolean flag to slice the underlying data arrays, returning a tensor loader for either the training or validation subset of the dataset.
0
1
Updated 2026-05-14
Tags
D2L
Dive into Deep Learning @ D2L