Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the type hints of "pooling.py". #48412

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions torch/nn/modules/pooling.py
Expand Up @@ -601,7 +601,7 @@ class AvgPool2d(_AvgPoolNd):
count_include_pad: bool

def __init__(self, kernel_size: _size_2_t, stride: Optional[_size_2_t] = None, padding: _size_2_t = 0,
ceil_mode: bool = False, count_include_pad: bool = True, divisor_override: bool = None) -> None:
ceil_mode: bool = False, count_include_pad: bool = True, divisor_override: int = None) -> None:
super(AvgPool2d, self).__init__()
self.kernel_size = kernel_size
self.stride = stride if (stride is not None) else kernel_size
Expand Down Expand Up @@ -686,7 +686,7 @@ class AvgPool3d(_AvgPoolNd):
count_include_pad: bool

def __init__(self, kernel_size: _size_3_t, stride: Optional[_size_3_t] = None, padding: _size_3_t = 0,
ceil_mode: bool = False, count_include_pad: bool = True, divisor_override=None) -> None:
ceil_mode: bool = False, count_include_pad: bool = True, divisor_override: int = None) -> None:
super(AvgPool3d, self).__init__()
self.kernel_size = kernel_size
self.stride = stride if (stride is not None) else kernel_size
Expand Down