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 I calculate the FLOPs of a model with some frozen layers during training? #194

Open
js-lee-AI opened this issue Dec 12, 2022 · 1 comment

Comments

@js-lee-AI
Copy link

js-lee-AI commented Dec 12, 2022

Thank you so much for sharing the code.

As far as I know, frozen layers have no effect on FLOPs in the forward pass. That is, even if frozen layers are included, FLOPs is only affected by the total number of parameters.

So, how do estimate the FLOPs in the backward pass when there are some frozen layers im the model? Is it correct to simply calculate 2 * forward_FLOPs?

I wonder if this code reflects my question.
If not, can someone please help me?

@juliannadvl
Copy link

Hi, have you figured it out ?

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