Lyken17 / pytorch-OpCounter

Count the MACs / FLOPs of your PyTorch model.
MIT License
4.85k stars 528 forks source link

AttributeError: module 'thop' has no attribute '__version__' #181

Closed glenn-jocher closed 2 years ago

glenn-jocher commented 2 years ago

I'd recommend adding a __version__ attribute to the thop package to allow users to quickly determine the version number, i.e.

Screen Shot 2022-07-12 at 2 46 40 PM

This attribute is used by YOLOv5 check_requirements() function for example to determine version numbers for upgrades and installs.

Lyken17 commented 2 years ago

Added https://github.com/Lyken17/pytorch-OpCounter/commit/1a872a2563396ea8ef0c843688cf0b47649c9657

glenn-jocher commented 2 years ago

Awesome!