Struct wyrm::InputNode [−][src]
pub struct InputNode { /* fields omitted */ }
Input node for the graph.
Methods
impl InputNode
[src]
impl InputNode
pub fn new(value: Arr) -> Variable<Self>
[src]
pub fn new(value: Arr) -> Variable<Self>
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 Debug for InputNode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Node for InputNode
[src]
impl Node for InputNode
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]
fn forward(&self)
Perform the forward step. Should recursively call the forward methods of its ancestors. Read more
fn backward(&self, _: &Ref<Self::InputGradient>)
[src]
fn backward(&self, _: &Ref<Self::InputGradient>)
Perform the backward step. Should recursively call the backward methods of its ancestors. Read more
fn value(&self) -> Bor<Self::Value>
[src]
fn value(&self) -> Bor<Self::Value>
Return the value of the node.
fn needs_gradient(&self) -> bool
[src]
fn needs_gradient(&self) -> bool
If the node needs to be used in the backward step.
fn clear(&self)
[src]
fn clear(&self)
Reset the caches of this node and its parents.