Use of separate graphs for Forward and Backward passes
Description
In PyTorch, the .detach()
method is used to separate a tensor from the computational graph, isolating parts of the graph from backpropagation during the backward pass. This allows for a clear distinction between the operations used during the forward pass (e.g., inference) and the backward pass.
This issue proposes to explore whether Aidge could implement a similar mechanism, enabling the use of two distinct computational graph, one for the forward pass and one for the backward pass.