mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: **Patch Description** Round out the rest of the optimizer types in torch.optim by creating the stubs for the rest of them. **Testing**: I ran mypy looking for just errors in that optim folder. There's no *new* mypy errors created. ``` $ mypy torch/optim | grep optim $ git checkout master; mypy torch/optim | wc -l 968 $ git checkout typeoptims; mypy torch/optim | wc -l 968 ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/31130 Reviewed By: stephenroller Differential Revision: D18947145 Pulled By: vincentqb fbshipit-source-id: 5b8582223833b1d9123d829acc1ed8243df87561
6 lines
336 B
Python
6 lines
336 B
Python
from typing import Tuple, Optional
|
|
from .optimizer import _params_t, Optimizer
|
|
|
|
class LBFGS(Optimizer):
|
|
def __init__(self, params: _params_t, lr: float=..., max_iter: int=..., max_eval: Optional[int]=..., tolerance_grad: float=..., tolerance_change: float=..., history_size: int=..., line_search_fn: Optional[str]=...) -> None: ...
|