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

FLOPs or MAC for conv? #785

Closed
harryhan618 opened this issue Jan 12, 2021 · 3 comments
Closed

FLOPs or MAC for conv? #785

harryhan618 opened this issue Jan 12, 2021 · 3 comments
Assignees

Comments

@harryhan618
Copy link
Contributor

It seems in flops_counter.py, multiplication and addition are treated as one operation. So I think it is calculating MAC rather than FLOPs? I think n MAC refers to n multiplication and (n-1) addition operations.

May I ask what's the usual way to calculate FLOPs?

@dreamerlin
Copy link
Contributor

Hi! There is no problem here: actually, everywhere variables named flops are handled as macs (ref). But for most CV tasks, we identify FLOPs with MACs.

@harryhan618
Copy link
Contributor Author

Thanks!

@code-by-jin
Copy link

Hi! There is no problem here: actually, everywhere variables named flops are handled as macs (ref). But for most CV tasks, we identify FLOPs with MACs.

Shouldn't FLOPs = 2* MACs. I am totally lost here. Should we just use the output macs to get flops, or we need multiply it by 2

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

4 participants