pub struct AccumulationStats {
pub total_micro_batches: usize,
pub total_updates: usize,
pub accumulation_steps: usize,
pub registered_params: usize,
pub total_param_elements: usize,
}Expand description
Statistics from gradient accumulation.
Fields§
§total_micro_batches: usizeTotal number of micro-batches processed.
total_updates: usizeTotal number of optimizer updates applied.
accumulation_steps: usizeConfigured number of accumulation steps.
registered_params: usizeNumber of registered parameters.
total_param_elements: usizeTotal number of scalar gradient elements across all parameters.
Implementations§
Source§impl AccumulationStats
impl AccumulationStats
Sourcepub fn effective_batch_multiplier(&self) -> usize
pub fn effective_batch_multiplier(&self) -> usize
The effective batch size multiplier (same as accumulation_steps).
Trait Implementations§
Source§impl Clone for AccumulationStats
impl Clone for AccumulationStats
Source§fn clone(&self) -> AccumulationStats
fn clone(&self) -> AccumulationStats
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 moreAuto Trait Implementations§
impl Freeze for AccumulationStats
impl RefUnwindSafe for AccumulationStats
impl Send for AccumulationStats
impl Sync for AccumulationStats
impl Unpin for AccumulationStats
impl UnsafeUnpin for AccumulationStats
impl UnwindSafe for AccumulationStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more