What seems to happen is that (at least in the tutorial) the functions doing the decoding are only taking one time step (and for GRU output == new hidden) and the loop over the outputs is in the train function. One might argue that it’d be more PyTorchy to wrap this loop into a Module. Using a cell or a model capable of multiple steps but feeding in sequence length 1 isn’t crucial here.
Best regards
Thomas