pub struct LBFGS<B: Backend + AutodiffBackend> { /* private fields */ }Expand description
Implementations§
Source§impl<B: Backend + AutodiffBackend> LBFGS<B>
impl<B: Backend + AutodiffBackend> LBFGS<B>
Sourcepub fn to_record(&self) -> LBFGSState<B::InnerBackend>
pub fn to_record(&self) -> LBFGSState<B::InnerBackend>
Export the optimizer state for checkpointing.
Sourcepub fn load_record(self, record: LBFGSState<B::InnerBackend>) -> Self
pub fn load_record(self, record: LBFGSState<B::InnerBackend>) -> Self
Restore optimizer state for the same configuration and ordered parameter layout.
Sourcepub fn step<M, F>(
&mut self,
lr: LearningRate,
module: M,
closure: F,
) -> (M, f64)
pub fn step<M, F>( &mut self, lr: LearningRate, module: M, closure: F, ) -> (M, f64)
A single optimization step for any tensor that represents the parameters of a model.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for LBFGS<B>
impl<B> RefUnwindSafe for LBFGS<B>
impl<B> Send for LBFGS<B>
impl<B> Sync for LBFGS<B>
impl<B> Unpin for LBFGS<B>
impl<B> UnsafeUnpin for LBFGS<B>
impl<B> UnwindSafe for LBFGS<B>
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