Struct wyrm::IndexInputNode
[−]
[src]
pub struct IndexInputNode { pub value: RefCell<SmallVec<[usize; 4]>>, }
An input node for integer indices into ParameterNode
s, used
for implementing indexable embedding layers.
Fields
value: RefCell<SmallVec<[usize; 4]>>
Methods
impl IndexInputNode
[src]
Trait Implementations
impl Debug for IndexInputNode
[src]
impl Node for IndexInputNode
[src]
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]
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.