pub struct MemoryEfficientOptimizerBuilder { /* private fields */ }Expand description
Builder for memory-efficient optimizers
Implementations§
Source§impl MemoryEfficientOptimizerBuilder
impl MemoryEfficientOptimizerBuilder
pub fn new() -> Self
pub fn max_memory_gb(self, gb: f32) -> Self
pub fn use_memory_pool(self, use_pool: bool) -> Self
pub fn compress_state(self, compress: bool) -> Self
pub fn lazy_gradients(self, lazy: bool) -> Self
pub fn checkpoint_interval(self, interval: usize) -> Self
pub fn build_adam( self, params: Vec<Arc<RwLock<Tensor>>>, lr: f32, ) -> MemoryEfficientAdam
pub fn build_lbfgs( self, params: Vec<Arc<RwLock<Tensor>>>, lr: f32, ) -> MemoryEfficientLBFGS
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryEfficientOptimizerBuilder
impl RefUnwindSafe for MemoryEfficientOptimizerBuilder
impl Send for MemoryEfficientOptimizerBuilder
impl Sync for MemoryEfficientOptimizerBuilder
impl Unpin for MemoryEfficientOptimizerBuilder
impl UnsafeUnpin for MemoryEfficientOptimizerBuilder
impl UnwindSafe for MemoryEfficientOptimizerBuilder
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