pub struct TrainEpoch<TI> { /* private fields */ }Expand description
A training epoch.
Implementations§
Source§impl<TI> TrainEpoch<TI>
impl<TI> TrainEpoch<TI>
Source§impl<TI> TrainEpoch<TI>
impl<TI> TrainEpoch<TI>
Sourcepub fn run<LC: LearnerComponents, TO>(
&self,
model: LC::Model,
optim: LC::Optimizer,
scheduler: &mut LC::LrScheduler,
processor: &mut LC::EventProcessor,
interrupter: &TrainingInterrupter,
) -> (LC::Model, LC::Optimizer)where
LC::EventProcessor: EventProcessor<ItemTrain = TO>,
LC::Model: TrainStep<TI, TO>,
pub fn run<LC: LearnerComponents, TO>(
&self,
model: LC::Model,
optim: LC::Optimizer,
scheduler: &mut LC::LrScheduler,
processor: &mut LC::EventProcessor,
interrupter: &TrainingInterrupter,
) -> (LC::Model, LC::Optimizer)where
LC::EventProcessor: EventProcessor<ItemTrain = TO>,
LC::Model: TrainStep<TI, TO>,
Source§impl<TI> TrainEpoch<TI>
impl<TI> TrainEpoch<TI>
Sourcepub fn run_multi_device<LC: LearnerComponents, TO>(
&self,
model: LC::Model,
optim: LC::Optimizer,
lr_scheduler: &mut LC::LrScheduler,
processor: &mut LC::EventProcessor,
devices: Vec<<LC::Backend as Backend>::Device>,
interrupter: &TrainingInterrupter,
) -> (LC::Model, LC::Optimizer)
pub fn run_multi_device<LC: LearnerComponents, TO>( &self, model: LC::Model, optim: LC::Optimizer, lr_scheduler: &mut LC::LrScheduler, processor: &mut LC::EventProcessor, devices: Vec<<LC::Backend as Backend>::Device>, interrupter: &TrainingInterrupter, ) -> (LC::Model, LC::Optimizer)
Auto Trait Implementations§
impl<TI> Freeze for TrainEpoch<TI>
impl<TI> !RefUnwindSafe for TrainEpoch<TI>
impl<TI> !Send for TrainEpoch<TI>
impl<TI> !Sync for TrainEpoch<TI>
impl<TI> Unpin for TrainEpoch<TI>
impl<TI> !UnwindSafe for TrainEpoch<TI>
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> 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