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: 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>
impl<B> RefUnwindSafe for LBFGSState<B>
impl<B> Send for LBFGSState<B>
impl<B> Sync for LBFGSState<B>
impl<B> Unpin for LBFGSState<B>
impl<B> UnsafeUnpin for LBFGSState<B>
impl<B> UnwindSafe for LBFGSState<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