[BUG] UserWarning: __floordiv__ is deprecated
LouisDo2108 opened this issue · 1 comments
LouisDo2108 commented
Describe the bug
UserWarning: floordiv is deprecated
To Reproduce
Steps to reproduce the behavior:
1.
2.
Expected behavior
No warning.
Screenshots
/home/htluc/miniconda3/envs/vofo/lib/python3.8/site-packages/effdet/bench.py:55: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
indices_all = cls_topk_indices_all // num_classes
Desktop (please complete the following information):
- Ubuntu 18.04, Slurm
- pypi 0.3.0
- pytorch 1.12.1 py3.8_cuda11.3_cudnn8.3.2_0
Additional context
Add any other context about the problem here.
rwightman commented
Not going to fix this one, just a warning that can be ignored but downsides to fixing.