mjq11302010044 / RRPN_pytorch

RRPN in pytorch 1.0 ----- Arbitrary-Oriented Scene Text Detection via Rotation Proposals
MIT License
262 stars 56 forks source link

/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. #54

Closed bringBackm closed 4 years ago

bringBackm commented 4 years ago

Solved Make sure you have the torch version 1.0.0.

gdjmck commented 4 years ago

Or you can just change the dtype of anchors in add_visibility_to() function in /modeling/rrpn/anchor_generator.py. It works for my pytorch 1.4 version and nan loss disappears.

bringBackm commented 4 years ago

@gdjmck Great!

Pekary commented 4 years ago

Or you can just change the dtype of anchors in add_visibility_to() function in /modeling/rrpn/anchor_generator.py. It works for my pytorch 1.4 version and nan loss disappears.

@gdjmck Hi, your method works when not using FPN, how to change the code avoiding this warning in FPN?I changed some torch.uint8 in related files, but the warning still exists.

gdjmck commented 4 years ago

Or you can just change the dtype of anchors in add_visibility_to() function in /modeling/rrpn/anchor_generator.py. It works for my pytorch 1.4 version and nan loss disappears.

@gdjmck Hi, your method works when not using FPN, how to change the code avoiding this warning in FPN?I changed some torch.uint8 in related files, but the warning still exists.

Maybe you can do something like below to raise the warning as exceptions to see which line of code causes the warning and deal with it.

import warnings warnings.filterwarnings('error', 'xxx')

Pekary commented 4 years ago

@gdjmck ok, thanks!