Struct AdaptiveNesterovMomentumState
pub struct AdaptiveNesterovMomentumState<B, const D: usize>where
B: Backend,{
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§
§impl<B, const D: usize> Clone for AdaptiveNesterovMomentumState<B, D>
impl<B, const D: usize> Clone for AdaptiveNesterovMomentumState<B, D>
§fn clone(&self) -> AdaptiveNesterovMomentumState<B, D>
fn clone(&self) -> AdaptiveNesterovMomentumState<B, D>
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 more§impl<B, const D: usize> Record<B> for AdaptiveNesterovMomentumState<B, D>where
B: Backend,
impl<B, const D: usize> Record<B> for AdaptiveNesterovMomentumState<B, D>where
B: Backend,
§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.
§fn into_item<S>(
self,
) -> <AdaptiveNesterovMomentumState<B, D> as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(
self,
) -> <AdaptiveNesterovMomentumState<B, D> as Record<B>>::Item<S>where
S: PrecisionSettings,
Convert the current record into the corresponding item that follows the given settings.
§fn from_item<S>(
item: <AdaptiveNesterovMomentumState<B, D> as Record<B>>::Item<S>,
device: &<B as BackendTypes>::Device,
) -> AdaptiveNesterovMomentumState<B, D>where
S: PrecisionSettings,
fn from_item<S>(
item: <AdaptiveNesterovMomentumState<B, D> as Record<B>>::Item<S>,
device: &<B as BackendTypes>::Device,
) -> AdaptiveNesterovMomentumState<B, D>where
S: PrecisionSettings,
Convert the given item into a record.
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> 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
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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