Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding the FLOPs #1

Closed
zhuchen03 opened this issue May 27, 2021 · 2 comments
Closed

Regarding the FLOPs #1

zhuchen03 opened this issue May 27, 2021 · 2 comments

Comments

@zhuchen03
Copy link

Hi,

I wonder how you computed the FLOPs. I used FlopCountAnalysis from fvcore.nn and it is larger than you reported.

@leoxiaobin
Copy link

leoxiaobin commented May 27, 2021

We use ptflops to compute the FLOPs, you can get it by specifying MODEL_SUMMARY to True.
Could you provide more details of the FLOPs computed by fvcore.nn?

@zhuchen03
Copy link
Author

Mystery solved. I was testing the non-official code from https://github.com/rishikksh20/convolution-vision-transformers, where they did not do the downsampling for the key and values. So the FLOPs from this implementation is higher than yours. Your numbers should be correct. I just wish you had released your code earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants