Enum burn::optim::record::AdaptorRecordV1
pub enum AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,{
Rank0(<O as SimpleOptimizer<B>>::State<0>),
Rank1(<O as SimpleOptimizer<B>>::State<1>),
Rank2(<O as SimpleOptimizer<B>>::State<2>),
Rank3(<O as SimpleOptimizer<B>>::State<3>),
Rank4(<O as SimpleOptimizer<B>>::State<4>),
Rank5(<O as SimpleOptimizer<B>>::State<5>),
Rank6(<O as SimpleOptimizer<B>>::State<6>),
Rank7(<O as SimpleOptimizer<B>>::State<7>),
Rank8(<O as SimpleOptimizer<B>>::State<8>),
}
Expand description
Optimizer adaptor record item.
Variants§
Rank0(<O as SimpleOptimizer<B>>::State<0>)
Rank 0.
Rank1(<O as SimpleOptimizer<B>>::State<1>)
Rank 1.
Rank2(<O as SimpleOptimizer<B>>::State<2>)
Rank 2.
Rank3(<O as SimpleOptimizer<B>>::State<3>)
Rank 3.
Rank4(<O as SimpleOptimizer<B>>::State<4>)
Rank 4.
Rank5(<O as SimpleOptimizer<B>>::State<5>)
Rank 5.
Rank6(<O as SimpleOptimizer<B>>::State<6>)
Rank 6.
Rank7(<O as SimpleOptimizer<B>>::State<7>)
Rank 7.
Rank8(<O as SimpleOptimizer<B>>::State<8>)
Rank 8.
Implementations§
§impl<O, B> AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
impl<O, B> AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
pub fn into_state<const D: usize>(self) -> <O as SimpleOptimizer<B>>::State<D>
pub fn into_state<const D: usize>(self) -> <O as SimpleOptimizer<B>>::State<D>
pub fn from_state<const D: usize>(
state: <O as SimpleOptimizer<B>>::State<D>,
) -> AdaptorRecordV1<O, B>
pub fn from_state<const D: usize>( state: <O as SimpleOptimizer<B>>::State<D>, ) -> AdaptorRecordV1<O, B>
Trait Implementations§
§impl<O, B> Clone for AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
impl<O, B> Clone for AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
§fn clone(&self) -> AdaptorRecordV1<O, B>
fn clone(&self) -> AdaptorRecordV1<O, B>
Returns a copy 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<O, B> Record<B> for AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
impl<O, B> Record<B> for AdaptorRecordV1<O, B>where
O: SimpleOptimizer<B>,
B: Backend,
§type Item<S: PrecisionSettings> = AdaptorRecordItemV1<O, B, S>
type Item<S: PrecisionSettings> = AdaptorRecordItemV1<O, B, S>
Type of the item that can be serialized and deserialized.
§fn into_item<S>(self) -> <AdaptorRecordV1<O, B> as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(self) -> <AdaptorRecordV1<O, B> 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: <AdaptorRecordV1<O, B> as Record<B>>::Item<S>,
device: &<B as Backend>::Device,
) -> AdaptorRecordV1<O, B>where
S: PrecisionSettings,
fn from_item<S>(
item: <AdaptorRecordV1<O, B> as Record<B>>::Item<S>,
device: &<B as Backend>::Device,
) -> AdaptorRecordV1<O, B>where
S: PrecisionSettings,
Convert the given item into a record.
Auto Trait Implementations§
impl<O, B> Freeze for AdaptorRecordV1<O, B>where
<O as SimpleOptimizer<B>>::State<0>: Freeze,
<O as SimpleOptimizer<B>>::State<1>: Freeze,
<O as SimpleOptimizer<B>>::State<2>: Freeze,
<O as SimpleOptimizer<B>>::State<3>: Freeze,
<O as SimpleOptimizer<B>>::State<4>: Freeze,
<O as SimpleOptimizer<B>>::State<5>: Freeze,
<O as SimpleOptimizer<B>>::State<6>: Freeze,
<O as SimpleOptimizer<B>>::State<7>: Freeze,
<O as SimpleOptimizer<B>>::State<8>: Freeze,
impl<O, B> RefUnwindSafe for AdaptorRecordV1<O, B>where
<O as SimpleOptimizer<B>>::State<0>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<1>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<2>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<3>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<4>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<5>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<6>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<7>: RefUnwindSafe,
<O as SimpleOptimizer<B>>::State<8>: RefUnwindSafe,
impl<O, B> Send for AdaptorRecordV1<O, B>
impl<O, B> Sync for AdaptorRecordV1<O, B>where
<O as SimpleOptimizer<B>>::State<0>: Sync,
<O as SimpleOptimizer<B>>::State<1>: Sync,
<O as SimpleOptimizer<B>>::State<2>: Sync,
<O as SimpleOptimizer<B>>::State<3>: Sync,
<O as SimpleOptimizer<B>>::State<4>: Sync,
<O as SimpleOptimizer<B>>::State<5>: Sync,
<O as SimpleOptimizer<B>>::State<6>: Sync,
<O as SimpleOptimizer<B>>::State<7>: Sync,
<O as SimpleOptimizer<B>>::State<8>: Sync,
impl<O, B> Unpin for AdaptorRecordV1<O, B>where
<O as SimpleOptimizer<B>>::State<0>: Unpin,
<O as SimpleOptimizer<B>>::State<1>: Unpin,
<O as SimpleOptimizer<B>>::State<2>: Unpin,
<O as SimpleOptimizer<B>>::State<3>: Unpin,
<O as SimpleOptimizer<B>>::State<4>: Unpin,
<O as SimpleOptimizer<B>>::State<5>: Unpin,
<O as SimpleOptimizer<B>>::State<6>: Unpin,
<O as SimpleOptimizer<B>>::State<7>: Unpin,
<O as SimpleOptimizer<B>>::State<8>: Unpin,
impl<O, B> UnwindSafe for AdaptorRecordV1<O, B>where
<O as SimpleOptimizer<B>>::State<0>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<1>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<2>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<3>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<4>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<5>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<6>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<7>: UnwindSafe,
<O as SimpleOptimizer<B>>::State<8>: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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