pub struct WeightedGradientsRecord {
pub gradients: GradientsParamsRecord,
pub state: WeightedAccumulationState,
}Expand description
Pending gradients and their actual normalization state, saved together.
Fields§
§gradients: GradientsParamsRecordValues keyed by the original model IDs; full precision settings recommended.
state: WeightedAccumulationStateWork dtype, loss scale, effective weight and pending microbatch count.
Trait Implementations§
Source§impl Clone for WeightedGradientsRecord
impl Clone for WeightedGradientsRecord
Source§impl Debug for WeightedGradientsRecord
impl Debug for WeightedGradientsRecord
Source§impl<B: Backend> Record<B> for WeightedGradientsRecord
impl<B: Backend> Record<B> for WeightedGradientsRecord
Source§type Item<S: PrecisionSettings> = (GradientsParamsRecord, WeightedAccumulationState)
type Item<S: PrecisionSettings> = (GradientsParamsRecord, WeightedAccumulationState)
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl !RefUnwindSafe for WeightedGradientsRecord
impl !UnwindSafe for WeightedGradientsRecord
impl Freeze for WeightedGradientsRecord
impl Send for WeightedGradientsRecord
impl Sync for WeightedGradientsRecord
impl Unpin for WeightedGradientsRecord
impl UnsafeUnpin for WeightedGradientsRecord
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