pub struct MulRule;Expand description
d(a * b)/da = b, d(a * b)/db = a. Upstream * b → a, upstream * a → b.
Trait Implementations§
Source§impl GradientRule for MulRule
impl GradientRule for MulRule
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 MulRule
impl RefUnwindSafe for MulRule
impl Send for MulRule
impl Sync for MulRule
impl Unpin for MulRule
impl UnsafeUnpin for MulRule
impl UnwindSafe for MulRule
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