pytorch/torch/nn/utils
Brian Vaughan dbb96ef30d improve annotation device parameters where a device ordinal is allowed (#113647)
Using mypy in code that depends on pytorch, I noticed that the type annotation doesn't allow a device ordinal.

`error: Argument "device" to "to_empty" of "Module" has incompatible type "int"; expected "str | device"  [arg-type]`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113647
Approved by: https://github.com/albanD
2023-11-17 14:41:22 +00:00
..
_expanded_weights docs: fix docstring errors in quantized modules and others (#112695) 2023-11-07 23:52:16 +00:00
__init__.py define public API for torch.nn.utils (#111026) 2023-10-12 23:05:23 +00:00
_deprecation_utils.py
_named_member_accessor.py docs: fix docstrings in distributed.py and others (fixes #112604) (#112657) 2023-11-02 05:52:47 +00:00
_per_sample_grad.py docs: fix docstrings in distributed.py and others (fixes #112604) (#112657) 2023-11-02 05:52:47 +00:00
clip_grad.py define public API for torch.nn.utils (#111026) 2023-10-12 23:05:23 +00:00
convert_parameters.py docs: fix docstring errors in quantized modules and others (#112695) 2023-11-07 23:52:16 +00:00
fusion.py define public API for torch.nn.utils (#111026) 2023-10-12 23:05:23 +00:00
init.py docs: fix docstrings in distributed.py and others (fixes #112604) (#112657) 2023-11-02 05:52:47 +00:00
memory_format.py docs: fix docstrings in distributed.py and others (fixes #112604) (#112657) 2023-11-02 05:52:47 +00:00
parametrizations.py Fix: docstring errors in torch.nn.utils - parametrizations.py/prune.py/weight_norm.py (#113021) 2023-11-06 17:24:32 +00:00
parametrize.py docs: Fix some docstring errors in torch.nn.utils parametrize/spectral_norm/stateless (#112786) 2023-11-03 18:19:43 +00:00
prune.py Fix: docstring errors in torch.nn.utils - parametrizations.py/prune.py/weight_norm.py (#113021) 2023-11-06 17:24:32 +00:00
rnn.py docs: fix docstring errors in quantized modules and others (#112695) 2023-11-07 23:52:16 +00:00
rnn.pyi improve annotation device parameters where a device ordinal is allowed (#113647) 2023-11-17 14:41:22 +00:00
spectral_norm.py docs: Fix some docstring errors in torch.nn.utils parametrize/spectral_norm/stateless (#112786) 2023-11-03 18:19:43 +00:00
stateless.py docs: Fix some docstring errors in torch.nn.utils parametrize/spectral_norm/stateless (#112786) 2023-11-03 18:19:43 +00:00
weight_norm.py Fix: docstring errors in torch.nn.utils - parametrizations.py/prune.py/weight_norm.py (#113021) 2023-11-06 17:24:32 +00:00