Lyken17 / pytorch-OpCounter

Count the MACs / FLOPs of your PyTorch model.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/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

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').

Hi @glenn-jocher ,thanks for notifiying me about this.

This is updated in 66ec784

@Lyken17 it's fixed! Thanks for the speedy response :)

Welcome :) Love your yolov5 project.