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

2d dct FLOPs computing method #7

Closed
TianhaoFu opened this issue Mar 2, 2021 · 5 comments
Closed

2d dct FLOPs computing method #7

TianhaoFu opened this issue Mar 2, 2021 · 5 comments

Comments

@TianhaoFu
Copy link

Hi, I noticed that in your paper you computed FCAnet model FLOPs.

I wonder how do you compute the FLOPs of 2d dct? Could you provide your formula or code?

Thanks!

@peterzpy
Copy link
Collaborator

peterzpy commented Mar 3, 2021

We compute the weight of 2d dct during initialization. The dct kernel is fixed and has no extra computation cost in the training phase.

@TianhaoFu
Copy link
Author

TianhaoFu commented Mar 5, 2021

We compute the weight of 2d dct during initialization. The dct kernel is fixed and has no extra computation cost in the training phase.

Thanks.
Leave the paper aside. Do you know how to compute the FLOPs of 2d dct?

If you can provide me some idea or code or fomula about that, I will be thanks so much:) 👍 @peterzpy

@cfzd
Copy link
Owner

cfzd commented Mar 5, 2021

@TianhaoFu
The realization of 2d dct is actually element product. For a image with a size h x w and a dct basis with a size of h x w, the re would be total hw times of multiplication.

@cfzd
Copy link
Owner

cfzd commented Mar 5, 2021

The FLOPs is calculated by: https://github.com/sovrasov/flops-counter.pytorch

@TianhaoFu
Copy link
Author

Thanks

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