pytorch/torch/optim/sgd.pyi
GdoongMathew fd1a01a393 Set default LR value of SGD to 1e-3 (#114467)
Fixes https://github.com/pytorch/pytorch/issues/114089

Set the lr to 1e-3 in SGD to increase the consistency of input signature of optimizers.

@janeyx99
This should be the redacted PR #114434 ,
sincerely.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114467
Approved by: https://github.com/janeyx99
2023-11-23 19:07:38 +00:00

13 lines
294 B
Python

from .optimizer import Optimizer, ParamsT
class SGD(Optimizer):
def __init__(
self,
params: ParamsT,
lr: float = ...,
momentum: float = ...,
dampening: float = ...,
weight_decay: float = ...,
nesterov: bool = ...,
) -> None: ...