If I create a network (for example using torch.nn.Sequential), then perform a forward pass, where are the values at the nodes stored ? They are needed for the backward operation to retropropagate the gradient of the error. Are they stored somewhere in the network during the forward pass, or does the backward pass first compute a forward pass to populate those node values in some temporary buffer ?
I am using Pytorch for reinforcement learning, hence I need to go back and forth through various states and I must be sure what state the network is in at any time.
Thank you,
Vincent