Lyken17 / pytorch-OpCounter

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

How to calculate the FLOPs of each type of layers? #210

Open TheSunWillRise opened 1 year ago

TheSunWillRise commented 1 year ago

I want to calculate the FLOPs of each type of different layers, how can I implement this? For example, calculate the flops of CNN layers and ReLU layers in resnet50, respectively.

Yuejingkun commented 1 month ago

I have the same question