Trait wyrm::Node[][src]

pub trait Node: Debug + 'static {
    type Value;
    type InputGradient;
    fn forward(&self);
fn backward(&self, _: &Ref<Self::InputGradient>);
fn value(&self) -> Bor<Self::Value>;
fn needs_gradient(&self) -> bool;
fn clear(&self); }

Trait representing a computation node. Structs implementing this trait can be used as elements of the computation graph.

Associated Types

Type of the node's value.

Type of the input gradient the node receives during backpropagation.

Required Methods

Perform the forward step. Should recursively call the forward methods of its ancestors.

Perform the backward step. Should recursively call the backward methods of its ancestors.

Return the value of the node.

If the node needs to be used in the backward step.

Reset the caches of this node and its parents.

Implementations on Foreign Types

impl Node for Rc<Node<Value = Arr, InputGradient = Arr>>
[src]

Implementors