Struct wyrm::IndexInputNode [−][src]
pub struct IndexInputNode { /* fields omitted */ }
An input node for integer indices into ParameterNode
s, used
for implementing indexable embedding layers.
Methods
impl IndexInputNode
[src]
impl IndexInputNode
Trait Implementations
impl Debug for IndexInputNode
[src]
impl Debug for IndexInputNode
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 IndexInputNode
[src]
impl Node for IndexInputNode
type Value = SmallVec<[usize; 4]>
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.
Auto Trait Implementations
impl Send for IndexInputNode
impl Send for IndexInputNode
impl !Sync for IndexInputNode
impl !Sync for IndexInputNode