pub struct GradEdge<Op: GraphOp> {
pub node: Option<Arc<GradNode<Op>>>,
pub key: GlobalValKey<Op>,
pub requires_grad: bool,
}Expand description
Fields§
§node: Option<Arc<GradNode<Op>>>Parent grad node. None denotes a leaf input.
key: GlobalValKey<Op>Gradient accumulation target for this input.
requires_grad: boolWhether the input participates in gradient propagation.
Implementations§
Auto Trait Implementations§
impl<Op> Freeze for GradEdge<Op>
impl<Op> RefUnwindSafe for GradEdge<Op>where
<Op as GraphOp>::InputKey: RefUnwindSafe,
Op: RefUnwindSafe,
<Op as GraphOp>::Operand: RefUnwindSafe,
impl<Op> Send for GradEdge<Op>
impl<Op> Sync for GradEdge<Op>
impl<Op> Unpin for GradEdge<Op>
impl<Op> UnsafeUnpin for GradEdge<Op>where
<Op as GraphOp>::InputKey: UnsafeUnpin,
Op: UnsafeUnpin,
impl<Op> UnwindSafe for GradEdge<Op>where
<Op as GraphOp>::InputKey: UnwindSafe + RefUnwindSafe,
Op: UnwindSafe + RefUnwindSafe,
<Op as GraphOp>::Operand: RefUnwindSafe,
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