When do we use 'step_wise'?

I have a question about step used in Transformer Decoder.
in PositionalEncoding, it uses ‘step’ under a certain condition.
I read already comments for this

 step (int or NoneType): If stepwise (``seq_len = 1``), use
                the encoding for this position.

but still I’m wonder in which case we are using it.

so can someone explain it for give some links of paper/blog to related it?

BTW, I can’t find any code not to set it as ‘None’, is there somewhere else?



During translation the decoder is called step by step:

1 Like

Thanks!!! :grinning: