Lyken17 / pytorch-OpCounter

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

Fix ONNX GlobalAveragePool output_size #207

Open thinxer opened 1 year ago

thinxer commented 1 year ago

Now ResNet50 ONNX report about 4.1G MACs instead of 4.3G MACs. The fix is based on https://onnx.ai/onnx/operators/onnx__GlobalAveragePool.html .