Repository: pytorch
Issue: AdaptiveMaxPool2d bug
Labels: oncall: jit

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

You can reproduce the problem through the following code:
```
from torch import nn
m = nn.AdaptiveMaxPool2d((5,7))  
input = torch.randn(1, 64, 8, 9)
output = m(input)
trace_result = torch.jit.trace(m, tuple(input))
for n in trace_result.graph.nodes():
    print(n.kind())
    n.output()
```
Code run results
``` shell
prim::Constant
prim::Constant
prim::ListConstruct
aten::adaptive_max_pool2d
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-26-a08947b19201> in <module>
      8 for n in trace_result.graph.nodes():
      9     print(n.kind())
---> 10     n.output()

RuntimeError: outputs_.size() == 1 INTERNAL ASSERT FAILED at "..\\torch/csrc/jit/ir/ir.h":447, please report a bug to PyTorch. 
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior
Expect no error.
<!-- A clear and concise description of what you expected to happen. -->

## Environment

PyTorch version: 1.8.1+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Enterprise Edition
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.20.3
Libc version: N/A

Python version: 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.18362-SP0
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] numpydoc==1.1.0
[pip3] pytorch-ignite==0.2.1
[pip3] torch==1.8.1+cpu
[pip3] torchaudio==0.8.1
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.9.1+cpu
[conda] blas                      1.0                         mkl    https://repo.anaconda.com/pkgs/main
[conda] cpuonly                   1.0                           0    pytorch
[conda] mkl                       2020.2                      256    defaults
[conda] mkl-service               2.3.0            py38hb782905_0    https://repo.anaconda.com/pkgs/main
[conda] mkl_fft                   1.2.0            py38h45dec08_0    defaults
[conda] mkl_random                1.1.1            py38h47e9c7a_0    https://repo.anaconda.com/pkgs/main
[conda] numpy                     1.19.1           py38h5510c5b_0    defaults
[conda] numpy-base                1.19.1           py38ha3acd2a_0    defaults
[conda] numpydoc                  1.1.0                      py_0    https://repo.anaconda.com/pkgs/main
[conda] pytorch-ignite            0.2.1                    pypi_0    pypi
[conda] torch                     1.8.1+cpu                pypi_0    pypi
[conda] torchaudio                0.8.1                      py38    pytorch
[conda] torchsummary              1.5.1                    pypi_0    pypi
[conda] torchvision               0.9.1+cpu                pypi_0    pypi