torch.nn.Module.named_parameters has wrong type annotation #48640
Labels
module: nn
Related to torch.nn
module: typing
Related to mypy type annotations
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
named_parameters(prefix: str = '', recurse: bool = True) -> Iterator[Tuple[str, torch.Tensor]]
hastorch.Tensor
in return type, but seems that it always narrower type -nn.Parameter
(as intorch.nn.Module.parameters
signature)Environment
pytorch 1.7
cc @albanD @mruberry @ezyang @malfet @rgommers @xuzhao9 @gramster
The text was updated successfully, but these errors were encountered: