Struct wyrm::ParameterNode
[−]
[src]
pub struct ParameterNode { /* fields omitted */ }Parameter node, holds the optimizable parameters of the model.
Methods
impl ParameterNode[src]
[src]
Create a parameter node that shares its parameter values
with other parameter nodes via the HogwildParameter object.
fn new(value: Arr) -> Variable<Self>[src]
Create a new parameter node. The parameters held by this node cannot be shared and optimized in parallel.
fn zero_gradient(&self)[src]
Zero the accumulated gradients of this node.
Trait Implementations
impl Debug for ParameterNode[src]
impl Node for ParameterNode[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
type OutputGradient = ()
Type of the gradient the node passes down to its ancestors 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, gradient: &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.