pub enum GradState {
Trainable,
Frozen,
Differentiable,
Severed,
LayoutDependent,
Unknown,
}Expand description
Gradient / trainability state attached to an expression node.
Variants§
Trainable
A leaf that is expected to receive gradients (e.g. Var / trainable parameter).
Frozen
A leaf that must not receive gradients (frozen weight, constant).
Differentiable
An intermediate on a differentiable path.
Severed
Gradient flow was cut (detach, known apply_op*_no_bwd, …).
LayoutDependent
Gradient exists only under layout assumptions we cannot prove.
Unknown
Not enough information.
Trait Implementations§
impl Copy for GradState
impl Eq for GradState
impl StructuralPartialEq for GradState
Auto Trait Implementations§
impl Freeze for GradState
impl RefUnwindSafe for GradState
impl Send for GradState
impl Sync for GradState
impl Unpin for GradState
impl UnsafeUnpin for GradState
impl UnwindSafe for GradState
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