pub struct AdaptiveNesterovMomentumState<B: Backend, const D: usize> {
pub time: usize,
pub exp_avg: Tensor<B, D>,
pub exp_avg_sq: Tensor<B, D>,
pub exp_avg_diff: Tensor<B, D>,
pub neg_pre_grad: Tensor<B, D>,
}Expand description
Adaptive Nesterov momentum state.
Fields§
§time: usizeThe number of iterations aggregated.
exp_avg: Tensor<B, D>The first order momentum.
exp_avg_sq: Tensor<B, D>The gradient-difference weighted second order momentum.
exp_avg_diff: Tensor<B, D>The gradient-difference momentum.
neg_pre_grad: Tensor<B, D>The negated previous gradient.
Implementations§
Trait Implementations§
Source§impl<B: Clone + Backend, const D: usize> Clone for AdaptiveNesterovMomentumState<B, D>
impl<B: Clone + Backend, const D: usize> Clone for AdaptiveNesterovMomentumState<B, D>
Source§fn clone(&self) -> AdaptiveNesterovMomentumState<B, D>
fn clone(&self) -> AdaptiveNesterovMomentumState<B, D>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B: Backend, const D: usize> Record<B> for AdaptiveNesterovMomentumState<B, D>
impl<B: Backend, const D: usize> Record<B> for AdaptiveNesterovMomentumState<B, D>
Source§type Item<S: PrecisionSettings> = AdaptiveNesterovMomentumStateItem<B, D, S>
type Item<S: PrecisionSettings> = AdaptiveNesterovMomentumStateItem<B, D, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B, const D: usize> Freeze for AdaptiveNesterovMomentumState<B, D>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B, const D: usize> RefUnwindSafe for AdaptiveNesterovMomentumState<B, D>where
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B, const D: usize> Send for AdaptiveNesterovMomentumState<B, D>
impl<B, const D: usize> Sync for AdaptiveNesterovMomentumState<B, D>
impl<B, const D: usize> Unpin for AdaptiveNesterovMomentumState<B, D>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B, const D: usize> UnsafeUnpin for AdaptiveNesterovMomentumState<B, D>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B, const D: usize> UnwindSafe for AdaptiveNesterovMomentumState<B, D>where
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,
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