logo

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

Returns true is the gradient of the node self can be overwritten.

Set the status of self as an overwritable node.

Implementations on Foreign Types

Implementors