mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49388 Test Plan: Imported from OSS Reviewed By: zou3519 Differential Revision: D25553672 Pulled By: glaringlee fbshipit-source-id: e9f2233bd678a90768844af2d8d5e2994d59e304
18 lines
661 B
Python
18 lines
661 B
Python
from typing import Iterable, Union, Callable, Optional, List
|
|
from .. import Tensor
|
|
|
|
_params_t = Union[Iterable[Tensor], Iterable[dict]]
|
|
|
|
|
|
class Optimizer:
|
|
defaults: dict
|
|
state: dict
|
|
param_groups: List[dict]
|
|
|
|
def __init__(self, params: _params_t, default: dict) -> None: ...
|
|
def __setstate__(self, state: dict) -> None: ...
|
|
def state_dict(self) -> dict: ...
|
|
def load_state_dict(self, state_dict: dict) -> None: ...
|
|
def zero_grad(self, set_to_none: Optional[bool]=...) -> None: ...
|
|
def step(self, closure: Optional[Callable[[], float]]=...) -> Optional[float]: ...
|
|
def add_param_group(self, param_group: dict) -> None: ...
|