For sequence to sequence models (for natural language translation for instance) you may want to have an LSTM or GRU output a sequence of unknown length. Here I’m not saying simply that the length varies between training examples, but also that the length of the output may not be known at test time. How does PyTorch deal with this? I assume that there’s maybe some maximum length output specified and padding or something, but how does this work with the loss function? I haven’t been able to find an example online of exactly this, otherwise I wouldn’t be asking here.
Thanks,
Jack