pub struct AddRule;Expand description
d(a + b)/da = 1, d(a + b)/db = 1. Upstream flows unchanged into both.
Trait Implementations§
Source§impl GradientRule for AddRule
impl GradientRule for AddRule
Source§fn backward(
&self,
_graph: &SharedGraph,
_op: &Op,
_inputs: &[NodeId],
_output: NodeId,
upstream: NodeId,
) -> GradientList
fn backward( &self, _graph: &SharedGraph, _op: &Op, _inputs: &[NodeId], _output: NodeId, upstream: NodeId, ) -> GradientList
Build gradient nodes for this op. Read more
Auto Trait Implementations§
impl Freeze for AddRule
impl RefUnwindSafe for AddRule
impl Send for AddRule
impl Sync for AddRule
impl Unpin for AddRule
impl UnsafeUnpin for AddRule
impl UnwindSafe for AddRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more