Enum burn::optim::record::AdaptorRecord
pub enum AdaptorRecord<O, B>{
V1(AdaptorRecordV1<O, <B as AutodiffBackend>::InnerBackend>),
}
Expand description
Optimizer adaptor record.
Records are versioned for backward compatibility, so old records can be loaded.
Variants§
V1(AdaptorRecordV1<O, <B as AutodiffBackend>::InnerBackend>)
Version 1.
Implementations§
§impl<O, B> AdaptorRecord<O, B>
impl<O, B> AdaptorRecord<O, B>
pub fn into_state<const D: usize>(
self,
) -> <O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<D>
pub fn into_state<const D: usize>( self, ) -> <O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<D>
pub fn from_state<const D: usize>(
state: <O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<D>,
) -> AdaptorRecord<O, B>
pub fn from_state<const D: usize>( state: <O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<D>, ) -> AdaptorRecord<O, B>
Trait Implementations§
§impl<O, B> Clone for AdaptorRecord<O, B>
impl<O, B> Clone for AdaptorRecord<O, B>
§fn clone(&self) -> AdaptorRecord<O, B>
fn clone(&self) -> AdaptorRecord<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 AdaptorRecord<O, B>
impl<O, B> Record<B> for AdaptorRecord<O, B>
§type Item<S: PrecisionSettings> = AdaptorRecordItem<O, B, S>
type Item<S: PrecisionSettings> = AdaptorRecordItem<O, B, S>
Type of the item that can be serialized and deserialized.
§fn into_item<S>(self) -> <AdaptorRecord<O, B> as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(self) -> <AdaptorRecord<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: <AdaptorRecord<O, B> as Record<B>>::Item<S>,
device: &<B as Backend>::Device,
) -> AdaptorRecord<O, B>where
S: PrecisionSettings,
fn from_item<S>(
item: <AdaptorRecord<O, B> as Record<B>>::Item<S>,
device: &<B as Backend>::Device,
) -> AdaptorRecord<O, B>where
S: PrecisionSettings,
Convert the given item into a record.
Auto Trait Implementations§
impl<O, B> Freeze for AdaptorRecord<O, B>where
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<0>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<1>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<2>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<3>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<4>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<5>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<6>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<7>: Freeze,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<8>: Freeze,
impl<O, B> RefUnwindSafe for AdaptorRecord<O, B>where
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<0>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<1>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<2>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<3>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<4>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<5>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<6>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<7>: RefUnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<8>: RefUnwindSafe,
impl<O, B> Send for AdaptorRecord<O, B>
impl<O, B> Sync for AdaptorRecord<O, B>where
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<0>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<1>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<2>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<3>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<4>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<5>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<6>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<7>: Sync,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<8>: Sync,
impl<O, B> Unpin for AdaptorRecord<O, B>where
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<0>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<1>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<2>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<3>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<4>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<5>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<6>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<7>: Unpin,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<8>: Unpin,
impl<O, B> UnwindSafe for AdaptorRecord<O, B>where
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<0>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<1>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<2>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<3>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<4>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<5>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<6>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::State<7>: UnwindSafe,
<O as SimpleOptimizer<<B as AutodiffBackend>::InnerBackend>>::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