nn.Transformer decoder question

If I’m trying to do sentence translation with Pytorch, what do I pass to nn.TransformerDecoder after I pass the sentence as src in nn.TransformerEncoder? Do I have to forward the output of the decoder into the input one word at a time until I get an end token?

I’m not the expert for sentence translation. But if my understanding is correct, you could use nn.Transformer. Pass the sentence as src to encoder. The output of encoder and target should be passed to the decoder.

Can anything be used as a start token?

yes, ensure it’s not part of your i/p’s.