pub struct ReluRule;Expand description
d(relu(x))/dx = (x > 0 ? 1 : 0) = step(x).
Trait Implementations§
Source§impl GradientRule for ReluRule
impl GradientRule for ReluRule
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 ReluRule
impl RefUnwindSafe for ReluRule
impl Send for ReluRule
impl Sync for ReluRule
impl Unpin for ReluRule
impl UnsafeUnpin for ReluRule
impl UnwindSafe for ReluRule
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