pub struct LBFGSState<B: Backend> {
pub history_s: Vec<Tensor<B, 1>>,
pub history_y: Vec<Tensor<B, 1>>,
pub d: Option<Tensor<B, 1>>,
pub t: Option<f64>,
pub prev_flat_grad: Option<Tensor<B, 1>>,
pub prev_loss: Option<f64>,
pub g_iter: usize,
}Expand description
L-BFGS optimizer state
Fields§
§history_s: Vec<Tensor<B, 1>>Historical displacement vectors
history_y: Vec<Tensor<B, 1>>Historical gradient difference vectors
d: Option<Tensor<B, 1>>Search direction
t: Option<f64>Step size from the previous iteration
prev_flat_grad: Option<Tensor<B, 1>>Flattened gradient from the previous iteration
prev_loss: Option<f64>Loss value from the previous iteration
g_iter: usizeGlobal iteration count
Implementations§
Trait Implementations§
Source§impl<B: Clone + Backend> Clone for LBFGSState<B>
impl<B: Clone + Backend> Clone for LBFGSState<B>
Source§fn clone(&self) -> LBFGSState<B>
fn clone(&self) -> LBFGSState<B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B: Backend> Default for LBFGSState<B>
impl<B: Backend> Default for LBFGSState<B>
Source§impl<B: Backend> Record<B> for LBFGSState<B>
impl<B: Backend> Record<B> for LBFGSState<B>
Source§type Item<S: PrecisionSettings> = LBFGSStateItem<B, S>
type Item<S: PrecisionSettings> = LBFGSStateItem<B, S>
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> Freeze for LBFGSState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for LBFGSState<B>where
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for LBFGSState<B>
impl<B> Sync for LBFGSState<B>
impl<B> Unpin for LBFGSState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for LBFGSState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for LBFGSState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B 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