TensorFlow, rnn.static_rnn in pytorch

Hi, I am curious about the PyTorch function.

Is there a function that functions like TensorFlow rnn.static_rnn?

Thank you for letting me know.

It seems the difference between static and dynamic rnn was that the static implementation used a strict maximal sequence length, while the dynamic implementation used a while-loop.

If you want to limit your RNN implementation to a static sequence length, you could use a condition and return the current activation/output.