pub struct AdaptiveMomentumState<B: Backend, const D: usize> {
pub time: usize,
pub moment_1: Tensor<B, D>,
pub moment_2: Tensor<B, D>,
pub max_moment_2: Option<Tensor<B, D>>,
}Expand description
Adaptive momentum state.
Fields§
§time: usizeThe number of iterations aggregated.
moment_1: Tensor<B, D>The first order momentum.
moment_2: Tensor<B, D>The second order momentum.
max_moment_2: Option<Tensor<B, D>>Max of second order momentum (for AMSGrad)
Implementations§
Source§impl<B: Backend, const D: usize> AdaptiveMomentumState<B, D>
impl<B: Backend, const D: usize> AdaptiveMomentumState<B, D>
Trait Implementations§
Source§impl<B: Backend, const D: usize> Record<B> for AdaptiveMomentumState<B, D>
impl<B: Backend, const D: usize> Record<B> for AdaptiveMomentumState<B, D>
Source§type Item<S: PrecisionSettings> = AdaptiveMomentumStateItem<B, D, S>
type Item<S: PrecisionSettings> = AdaptiveMomentumStateItem<B, D, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B, const D: usize> Freeze for AdaptiveMomentumState<B, D>
impl<B, const D: usize> RefUnwindSafe for AdaptiveMomentumState<B, D>
impl<B, const D: usize> Send for AdaptiveMomentumState<B, D>
impl<B, const D: usize> Sync for AdaptiveMomentumState<B, D>
impl<B, const D: usize> Unpin for AdaptiveMomentumState<B, D>
impl<B, const D: usize> UnsafeUnpin for AdaptiveMomentumState<B, D>
impl<B, const D: usize> UnwindSafe for AdaptiveMomentumState<B, D>
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