pub struct CenteredState<B: Backend, const D: usize> {
pub grad_avg: Option<Tensor<B, D>>,
pub avg: Tensor<B, D>,
}Expand description
CenteredState is to store and pass optimizer step params.
Fields§
§grad_avg: Option<Tensor<B, D>>The averaged gradient to calculate the centered gradient, if available.
avg: Tensor<B, D>The current average value.
Implementations§
Source§impl<B: Backend, const D: usize> CenteredState<B, D>
impl<B: Backend, const D: usize> CenteredState<B, D>
Trait Implementations§
Source§impl<B: Backend, const D: usize> Record<B> for CenteredState<B, D>
impl<B: Backend, const D: usize> Record<B> for CenteredState<B, D>
Source§type Item<S: PrecisionSettings> = CenteredStateItem<B, D, S>
type Item<S: PrecisionSettings> = CenteredStateItem<B, D, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B, const D: usize> Freeze for CenteredState<B, D>
impl<B, const D: usize> RefUnwindSafe for CenteredState<B, D>
impl<B, const D: usize> Send for CenteredState<B, D>
impl<B, const D: usize> Sync for CenteredState<B, D>
impl<B, const D: usize> Unpin for CenteredState<B, D>
impl<B, const D: usize> UnsafeUnpin for CenteredState<B, D>
impl<B, const D: usize> UnwindSafe for CenteredState<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