Repository: pytorch
Issue: Pytorch report INTERNAL ASSERT FAILED at ..\torch\csrc\jit\ir.cpp:1529 when use torch.jit.script to convert to model
Labels: needs reproduction,oncall: jit,triaged

## 🐛 Bug
```
<!-- A clear and concise description of what the bug is. -->
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 534, in recursive_script
    return create_script_module(nn_module, infer_methods_to_compile(nn_module))
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 296, in create_script_mod
ule
    return create_script_module_impl(nn_module, concrete_type, cpp_module, stubs)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 336, in create_script_mod
ule_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\__init__.py", line 1593, in _construct
    init_fn(script_module)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 328, in init_fn
    scripted = recursive_script(orig_value)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 534, in recursive_script
    return create_script_module(nn_module, infer_methods_to_compile(nn_module))
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 296, in create_script_mod
ule
    return create_script_module_impl(nn_module, concrete_type, cpp_module, stubs)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 340, in create_script_mod
ule_impl
    create_methods_from_stubs(concrete_type, stubs)
  File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\jit\_recursive.py", line 259, in create_methods_fr
om_stubs
    concrete_type._create_methods(defs, rcbs, defaults)
RuntimeError: values[i]->type()->isSubtypeOf(value_type) INTERNAL ASSERT FAILED at ..\torch\csrc\jit\ir.cpp:1529, please
 report a bug to PyTorch.  (createDict at ..\torch\csrc\jit\ir.cpp:1529)
(no backtrace available)
```
## To Reproduce

Steps to reproduce the behavior:

1.
1.
1.

<!-- 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. -->

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

(pytorch) PS D:\test> python .\collect_env.py
Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Microsoft Windows 10 专业版
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] torch==1.4.0
[pip] torchvision==0.5.0
[conda] libblas                   3.8.0                    15_mkl    https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge
[conda] libcblas                  3.8.0                    15_mkl    https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge
[conda] liblapack                 3.8.0                    15_mkl    https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge
[conda] liblapacke                3.8.0                    15_mkl    https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge
[conda] mkl                       2020.0                      166    https://mirrors.ustc.edu.cn/anaconda/pkgs/main
[conda] pytorch                   1.4.0           py3.8_cuda101_cudnn7_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
[conda] torchvision               0.5.0                py38_cu101    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch

## Additional context

<!-- Add any other context about the problem here. -->


cc @suo