Trait neuronika::Gradient [−][src]
pub trait Gradient {
type Dim: Dimension;
fn gradient(&self) -> Ref<'_, Array<f32, Self::Dim>>;
fn gradient_mut(&self) -> RefMut<'_, Array<f32, Self::Dim>>;
}
Expand description
Gradient representation.
This trait is implemented by all the internal backward components of VarDiff
.
It provides the .gradient()
method that is used to get a Ref
to the data stored inside
the node.
Associated Types
Required methods
Returns an immutable reference to the gradient inside self
.