xxxnell / how-do-vits-work

(ICLR 2022 Spotlight) Official PyTorch implementation of "How Do Vision Transformers Work?"
https://arxiv.org/abs/2202.06709
Apache License 2.0
806 stars 79 forks source link

Total parameters in AlterNet #33

Closed sauravtii closed 1 year ago

sauravtii commented 1 year ago

What are the total number of parameters and total FLOPS of AlterNet for CIFAR-100 and ImageNet dataset?

xxxnell commented 1 year ago

Hi @sauravtii, thank you for reaching out.

The number of params and MACs (~ 0.5 × FLOPs) of AlterNet-50 are 33.0M and 1.52G on CIFAR-100, respectively. On ImageNet, they are 34.9M and 4.75G . For comparison, the FLOPs and MACs of (modified) ResNet-50 as a baseline are 28.2M and 1.38G on CIFAR-100, and 30.0M and 4.35G on ImageNet.

The MACs have been calculated using thop library.