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

How do you calculate FLOPs? #11

Closed
Kim-yhao opened this issue Apr 29, 2024 · 3 comments
Closed

How do you calculate FLOPs? #11

Kim-yhao opened this issue Apr 29, 2024 · 3 comments

Comments

@Kim-yhao
Copy link

Please tell me where is the code used to calculate FLOPs? Or can you tell me what is the shape of the input used to calculate FLOPs?

@Kim-yhao
Copy link
Author

I tested my Swin-UMamba using thop.profile() and an image with shape (3, 224, 224), and the result was 4.4 GFLOPs, which is a big difference between your result.

@JiarunLiu
Copy link
Owner

Hi @Kim-yhao, we use fvcore to calculate FLOPs with the code from this issue. The shape of the input varies across different datasets:

  • AbdomenMRI: (1, 320, 320)
  • Endoscopy: (3, 384, 640)
  • Microscopy: (3, 512, 512)

@Weixiang-Sun
Copy link

Hi @Kim-yhao, we use fvcore to calculate FLOPs with the code from this issue. The shape of the input varies across different datasets:

  • AbdomenMRI: (1, 320, 320)
  • Endoscopy: (3, 384, 640)
  • Microscopy: (3, 512, 512)

Could you release the py file to calculate this in your project? thank you

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

3 participants