yitu-opensource / T2T-ViT

ICCV2021, Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
Other
1.14k stars 177 forks source link

How to calculate MACs/FLOPs? #37

Closed chenwydj closed 3 years ago

chenwydj commented 3 years ago

I wonder if you could share the code to calculate the MACs/FLOPs of the whole network under different input sizes?

I think directly using libraries like thop will fail since it does not support matmul (via @ operator).

Thank you very much!

yuanli2333 commented 3 years ago

Hi, please refer to these similar issues: issue05 and issue10

chenwydj commented 3 years ago

Thank you very much!