Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | List of all members
torch.optim.lbfgs.LBFGS Class Reference
Inheritance diagram for torch.optim.lbfgs.LBFGS:

Public Member Functions

def __init__ (self, params, lr=1, max_iter=20, max_eval=None, tolerance_grad=1e-5, tolerance_change=1e-9, history_size=100, line_search_fn=None)
def step (self, closure)

Detailed Description

Implements L-BFGS algorithm.

.. warning::
    This optimizer doesn't support per-parameter options and parameter
    groups (there can be only one).

.. warning::
    Right now all parameters have to be on a single device. This will be
    improved in the future.

.. note::
    This is a very memory intensive optimizer (it requires additional
    ``param_bytes * (history_size + 1)`` bytes). If it doesn't fit in memory
    try reducing the history size, or use a different algorithm.

    lr (float): learning rate (default: 1)
    max_iter (int): maximal number of iterations per optimization step
        (default: 20)
    max_eval (int): maximal number of function evaluations per optimization
        step (default: max_iter * 1.25).
    tolerance_grad (float): termination tolerance on first order optimality
        (default: 1e-5).
    tolerance_change (float): termination tolerance on function
        value/parameter changes (default: 1e-9).
    history_size (int): update history size (default: 100).

Definition at line 6 of file

Member Function Documentation

def torch.optim.lbfgs.LBFGS.step (   self,
Performs a single optimization step.

    closure (callable): A closure that reevaluates the model
and returns the loss.

Definition at line 78 of file

The documentation for this class was generated from the following file: