Hello,
I have installed:
Pytorch 1.4.0
cuda: 10.1
after running:
python3 tools/train.py ./configs/ssd300_coco.py
Training will be started but with this warning, Is there any Idea to remove it?
2020-01-24 18:31:56,041 - INFO - Start running, host: ali@ali-ubt, work_dir: /home/ali/00_2020/mmdetection/work_dirs/ssd300_coco
2020-01-24 18:31:56,041 - INFO - workflow: [('train', 1)], max: 24 epochs
/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
A first guess is here, for now, you can try to remove the .type(torch.uint8) and also set related variables to be bool somewhere.
Thanks for your kind notification, we will also fix this warning in the future.
I can confirm this issue. I've tried PyTorch versions from 1.4 to 1.2 and still receive the error. However, with PyTorch 1.1 this warning doesn't occur.
When this change is implemented, can it be back-ported into 1.0?
This change should be independent, so you can fix it in your environment.
You can add this in train.py while training (to ignore the warning):
import warnings
warnings.filterwarnings("ignore", category=UserWarning)
The below task also produces this error.
root@1bac3eaaf785:/mmdetection# python tools/train.py configs/htc/htc_x101_64x4d_fpn_20e_16gpu.py
2020-03-10 14:49:23,916 - mmdet - INFO - Environment info:
------------------------------------------------------------
TorchVision: 0.4.1a0+d94043a
OpenCV: 4.2.0
MMCV: 0.3.2
MMDetection: 1.1.0+e08a1ee
MMDetection Compiler: GCC 5.4
MMDetection CUDA Compiler: 10.1
Most helpful comment
You can add this in train.py while training (to ignore the warning):