pub enum GradientStrategy {
None,
Full,
Checkpointed {
checkpoint_interval: usize,
},
Accumulated {
accumulation_steps: usize,
},
}Expand description
Gradient computation strategy
Variants§
None
No gradient computation
Full
Full gradient computation (standard backprop)
Checkpointed
Checkpointing (recompute forward pass to save memory)
Accumulated
Gradient accumulation across multiple steps
Trait Implementations§
Source§impl Clone for GradientStrategy
impl Clone for GradientStrategy
Source§fn clone(&self) -> GradientStrategy
fn clone(&self) -> GradientStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GradientStrategy
impl Debug for GradientStrategy
Source§impl PartialEq for GradientStrategy
impl PartialEq for GradientStrategy
impl Copy for GradientStrategy
impl Eq for GradientStrategy
impl StructuralPartialEq for GradientStrategy
Auto Trait Implementations§
impl Freeze for GradientStrategy
impl RefUnwindSafe for GradientStrategy
impl Send for GradientStrategy
impl Sync for GradientStrategy
impl Unpin for GradientStrategy
impl UnwindSafe for GradientStrategy
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