Struct wyrm::InputNode
[−]
[src]
pub struct InputNode { pub value: RefCell<Arr>, }
Input node for the graph.
Fields
value: RefCell<Arr>
Methods
impl InputNode
[src]
fn new(value: Arr) -> Variable<Self>
[src]
Create a new input node with a given value. This fixes the shape of the node in the graph.
Trait Implementations
impl Debug for InputNode
[src]
impl Node for InputNode
[src]
type Value = Arr
Type of the node's value.
type InputGradient = Arr
Type of the input gradient the node receives during backpropagation. Read more
fn forward(&self)
[src]
Perform the forward step. Should recursively call the forward methods of its ancestors. Read more
fn backward(&self, _: &Ref<Self::InputGradient>)
[src]
Perform the backward step. Should recursively call the backward methods of its ancestors. Read more
fn value(&self) -> Bor<Self::Value>
[src]
Return the value of the node.
fn needs_gradient(&self) -> bool
[src]
If the node needs to be used in the backward step.