Repository: pytorch
Issue: Pytorch to ONNX model conversion
Labels: module: onnx,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
# Bug Report

### System information
- OS Platform and Distribution : Windows 10
- How you installed PyTorch : pip 
- PyTorch Version : 1.10.0+cpu
- ONNX version (*e.g. 1.7*):  1.10.2
- ONNX runtime version : 1.9.0
- Python version: 3.7.12
- Protobuf version: 3.16.0


## To reproduce
### Problem
-  I am trying to convert a `Pytorch model` to  `.onnx model`.
- I load the model using pretrained weights in .pt file and use model.eval() 
-  Then I use the following command to export the model in .onnx fomat
```python
    torch.onnx.export(model ,
                      img , 
                      "model_opset11.onnx" , 
                      export_params=True , 
                      do_constant_folding=True,
                      opset_version=11)
``` 
- img is the test image
- The model is successfully converted into .onnx format
- But when I run  my inference session in onnxruntime using the command :
```python
import onnxruntime as rt
sess = rt.InferenceSession("PATH_TO_ONNX_FILE")
```
- Iam getting the following error :
![image](https://user-images.githubusercontent.com/65274398/143572483-b1dbe8ee-aaf4-4383-a418-420bbed53178.png)
- Can anyone please tell me where iam going wrong?
- Here is a link to my .pt and .onnx files : [Link](https://drive.google.com/drive/folders/1809YrximwaDsDe1e6w9qMYyYVesi4QVV?usp=sharing)


<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
When I run the converted .onnx file in onnx runtime using inference session  then it should not give any error
## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
PyTorch version: 1.10.0+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Home Single Language
GCC version: (MinGW.org GCC Build-20200227-1) 9.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [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.5
[pip3] torch==1.10.0
[pip3] torchvision==0.11.1
[conda] numpy                     1.19.5                   pypi_0    pypi
[conda] torch                     1.10.0                   pypi_0    pypi
[conda] torchvision               0.11.1                   pypi_0    pypi

## Additional context
I also opened an issue in the ONNX repository : [issue](https://github.com/onnx/onnx/issues/3864#issue-1064364612) but it was closed as they said it is a problem regarding `converters` and I should open an issue in pytorch
<!-- Add any other context about the problem here. -->