diff --git a/torch/nn/modules/pooling.py b/torch/nn/modules/pooling.py index 40e1a9d37996b..f1ea199ebf22b 100644 --- a/torch/nn/modules/pooling.py +++ b/torch/nn/modules/pooling.py @@ -1099,7 +1099,7 @@ class AdaptiveAvgPool2d(_AdaptiveAvgPoolNd): >>> input = torch.randn(1, 64, 10, 9) >>> output = m(input) >>> # target output size of 10x7 - >>> m = nn.AdaptiveMaxPool2d((None, 7)) + >>> m = nn.AdaptiveAvgPool2d((None, 7)) >>> input = torch.randn(1, 64, 10, 9) >>> output = m(input) @@ -1133,7 +1133,7 @@ class AdaptiveAvgPool3d(_AdaptiveAvgPoolNd): >>> input = torch.randn(1, 64, 10, 9, 8) >>> output = m(input) >>> # target output size of 7x9x8 - >>> m = nn.AdaptiveMaxPool3d((7, None, None)) + >>> m = nn.AdaptiveAvgPool3d((7, None, None)) >>> input = torch.randn(1, 64, 10, 9, 8) >>> output = m(input)