Repository: pytorch
Issue: RuntimeError: storage_.IsType<T>() ASSERT FAILED
Labels: awaiting response (this tag is deprecated),caffe2,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## 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 Version (e.g., 1.0):
 - OS (e.g., Linux): Ubuntu16.04
 - How you installed PyTorch (`conda`, `pip`, source):conda
 - Build command you used (if compiling from source):
 - Python version:2.7
 - CUDA/cuDNN version:9.0
 - GPU models and configuration:1080ti*2
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
```
RuntimeError: storage_.IsType<T>() ASSERT FAILED at /opt/conda/conda-bld/pytorch-nightly_1549065566119/work/c10/core/TensorImpl.h:571, please report a bug to PyTorch. Tensor type mismatch, caller expects elements to be float, while tensor contains int. Error from operator: 
input: "gpu_1/mask_fcn_char_logits" input: "gpu_1/masks_char_int32" input: "gpu_1/masks_char_weight" output: "gpu_1/mask_cls_prob" output: "gpu_1/loss_char_mask" name: "" type: "SpatialSoftmaxWithLoss" arg { name: "scale" f: 0.5 } device_option { device_type: 1 device_id: 1 } (data at /opt/conda/conda-bld/pytorch-nightly_1549065566119/work/c10/core/TensorImpl.h:571)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x45 (0x7f5a238c98b5 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libc10.so)
frame #1: float* c10::TensorImpl::data<float>() const + 0x2c5 (0x7f5a54574a25 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #2: caffe2::SpatialSoftmaxWithLossOp<float, caffe2::CUDAContext>::RunOnDevice() + 0x5da (0x7f5a267e028a in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2_gpu.so)
frame #3: <unknown function> + 0x145bdc5 (0x7f5a251cddc5 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2_gpu.so)
frame #4: caffe2::AsyncNetBase::run(int, int) + 0x144 (0x7f5a54ec72a4 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #5: <unknown function> + 0x1509842 (0x7f5a54ecd842 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #6: c10::ThreadPool::main_loop(unsigned long) + 0x273 (0x7f5a53f81d33 in /home/super/.conda/envs/MaskTextSpotter/lib/python2.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #7: <unknown function> + 0xb8678 (0x7f5a67bd7678 in /home/super/.conda/envs/MaskTextSpotter/bin/../lib/libstdc++.so.6)
frame #8: <unknown function> + 0x76ba (0x7f5a6e7d16ba in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #9: clone + 0x6d (0x7f5a6ddf741d in /lib/x86_64-linux-gnu/libc.so.6)
```