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 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>where
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::FloatTensorPrimitive: Freeze,
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for LBFGS<B>where
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for LBFGS<B>
impl<B> Sync for LBFGS<B>
impl<B> Unpin for LBFGS<B>where
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::FloatTensorPrimitive: Unpin,
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for LBFGS<B>where
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for LBFGS<B>where
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<<B as AutodiffBackend>::InnerBackend as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,
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