/opt/conda/lib/python3.8/site-packages/thop/vision/basic_hooks.py:115: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch.
glenn-jocher opened this issue · comments
Glenn Jocher commented
Running YOLOv5 in Docker image with torch 1.11.0 produces this thop warning. It appears to apply generally to all PyTorch models.
/opt/conda/lib/python3.8/site-packages/thop/vision/basic_hooks.py:115: 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').
Ligeng Zhu commented
Hi @glenn-jocher ,thanks for notifiying me about this.
This is updated in 66ec784
Glenn Jocher commented
@Lyken17 it's fixed! Thanks for the speedy response :)
Ligeng Zhu commented
Welcome :) Love your yolov5 project.