Hi! I’m reading up on PyTorch, and would like to understand a bit better how custom RNN cells work.


Does save_for_backward() work for operations like RNN cells where the same operation instance is forwarded multiple times before backward is called, or does anything special need to be done for this use case?


Are there any limitations as to what operations can be used in an RNN cell, or can it be assumed that all built-in operations will save/restore state as needed (incl. any cuDNN state, if accelerated) such that they work in this multiple forward, then multiple backward case?


Thanks!