Struct burn::train::MultiDevicesTrainStep
pub struct MultiDevicesTrainStep<B, M, TI, TO>where
B: AutodiffBackend,{ /* private fields */ }
Expand description
Multi devices train step.
Implementations§
§impl<B, M, TI, TO> MultiDevicesTrainStep<B, M, TI, TO>where
B: AutodiffBackend,
M: AutodiffModule<B> + TrainStep<TI, TO> + Send + Clone + 'static,
TI: Send + 'static,
TO: Send + 'static,
impl<B, M, TI, TO> MultiDevicesTrainStep<B, M, TI, TO>where
B: AutodiffBackend,
M: AutodiffModule<B> + TrainStep<TI, TO> + Send + Clone + 'static,
TI: Send + 'static,
TO: Send + 'static,
pub fn new(
devices: &[<B as Backend>::Device],
) -> MultiDevicesTrainStep<B, M, TI, TO>where
TI: Send + 'static,
pub fn new(
devices: &[<B as Backend>::Device],
) -> MultiDevicesTrainStep<B, M, TI, TO>where
TI: Send + 'static,
pub fn step<'a>(
&self,
dataloader: &mut Box<dyn DataLoaderIterator<TI, Item = TI> + 'a>,
model: &M,
) -> Vec<TrainOutput<TO>>
pub fn step<'a>( &self, dataloader: &mut Box<dyn DataLoaderIterator<TI, Item = TI> + 'a>, model: &M, ) -> Vec<TrainOutput<TO>>
Auto Trait Implementations§
impl<B, M, TI, TO> Freeze for MultiDevicesTrainStep<B, M, TI, TO>
impl<B, M, TI, TO> RefUnwindSafe for MultiDevicesTrainStep<B, M, TI, TO>
impl<B, M, TI, TO> Send for MultiDevicesTrainStep<B, M, TI, TO>
impl<B, M, TI, TO> !Sync for MultiDevicesTrainStep<B, M, TI, TO>
impl<B, M, TI, TO> Unpin for MultiDevicesTrainStep<B, M, TI, TO>
impl<B, M, TI, TO> UnwindSafe for MultiDevicesTrainStep<B, M, TI, TO>
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<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