pytorch/torch/nn/parameter.pyi
jeongukjae 320d1a1573 Fix wrong typing (torch/nn/parameter.pyi) (#32617)
Summary:
A constructor of `nn.Parameter` has default values on `data` and `requires_grad`, but in type stub, there are no default values.

Resolve https://github.com/pytorch/pytorch/issues/32481
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32617

Differential Revision: D19571397

Pulled By: ngimel

fbshipit-source-id: fd14298aa472b7575221229cecf5a56f8c84f531
2020-01-25 16:19:33 -08:00

8 lines
153 B
Python

from .. import Tensor
import builtins
class Parameter(Tensor):
def __init__(self, data: Tensor=..., requires_grad: builtins.bool=...): ...
...