Trait neuronika::Backward [−][src]
Expand description
Back-propagation behavior.
This trait is implemented by all the internal backward components of VarDiff
.
The main method it provides is the .backward()
method that is used to back-propagate gradients
from the root variables to the graph’s leaves.
The other two methods, namely .no_grad()
and .with_grad()
are used to shut down
gradients’ computation.
Required methods
Propagates the computations backwards.
It also defines the logic for the back-propagation of the node.
Shuts down the computation of the gradient for the node self
and de-allocates its gradient.