pub struct CheckpointBuilder { /* private fields */ }Expand description
Builder for creating checkpoints.
Implementations§
Source§impl CheckpointBuilder
impl CheckpointBuilder
Sourcepub fn model_state(self, state: StateDict) -> Self
pub fn model_state(self, state: StateDict) -> Self
Set the model state.
Sourcepub fn optimizer_state(self, state: StateDict) -> Self
pub fn optimizer_state(self, state: StateDict) -> Self
Set the optimizer state.
Sourcepub fn training_state(self, state: TrainingState) -> Self
pub fn training_state(self, state: TrainingState) -> Self
Set the training state.
Sourcepub fn global_step(self, step: usize) -> Self
pub fn global_step(self, step: usize) -> Self
Set the global step.
Sourcepub fn build(self) -> Checkpoint
pub fn build(self) -> Checkpoint
Build the checkpoint.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointBuilder
impl RefUnwindSafe for CheckpointBuilder
impl Send for CheckpointBuilder
impl Sync for CheckpointBuilder
impl Unpin for CheckpointBuilder
impl UnwindSafe for CheckpointBuilder
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