From c886c7f6dd04303b0dcfb348aa2a5973f9c3efcf Mon Sep 17 00:00:00 2001 From: frgfm Date: Wed, 28 Oct 2020 08:07:07 -0700 Subject: [PATCH] fix: Fixed typing of bool in _ConvNd (#46828) Summary: Hello there :wave: I do believe there is some typo in the typing of the `bool` argument of `_ConvNd`constructor. The typing of the attribute is correct, but the constructor argument, while being the same way, is not the value that will be assigned to `self.bias`. This PR simply corrects that. Any feedback is welcome! Pull Request resolved: https://github.com/pytorch/pytorch/pull/46828 Reviewed By: izdeby Differential Revision: D24550435 Pulled By: ezyang fbshipit-source-id: ab10f1a5b29a912cb23fc321a51e78b04a8391e3 --- torch/nn/modules/conv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/nn/modules/conv.py b/torch/nn/modules/conv.py index 7280eab37caa..20a1d49619b0 100644 --- a/torch/nn/modules/conv.py +++ b/torch/nn/modules/conv.py @@ -69,7 +69,7 @@ def __init__(self, transposed: bool, output_padding: _size_1_t, groups: int, - bias: Optional[Tensor], + bias: bool, padding_mode: str) -> None: super(_ConvNd, self).__init__() if in_channels % groups != 0: