Trait neuronika::Overwrite [−][src]
pub trait Overwrite {
fn can_overwrite(&self) -> bool;
fn set_overwrite(&self, state: bool);
}
Expand description
Gradient accumulation’s mode.
This trait is used to keep track of the gradient status. It specifies whether the gradient
must be overwritten or accumulated with +=
.
Required methods
fn can_overwrite(&self) -> bool
fn can_overwrite(&self) -> bool
Returns true
is the gradient of the node self
can be overwritten.
fn set_overwrite(&self, state: bool)
fn set_overwrite(&self, state: bool)
Set the status of self
as an overwritable node.