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
Counting ReLU vs HardSwish FLOPs #62
Comments
I treat HSwish as zero FLOPs as MobileNetV3 does. |
I could not find any information about counting HardSwish as zero FLOPs in the paper and this might be my mistake. this file describes FLOPS of the models. |
Sorry, I'm misleading. The FLOPS of HSwish is so small compared to that of Conv, its value is rounded-up. |
I calculated provided ghostnet parameters and FLOPS below. I replaced ReLU with HardSwish of provided ghostnet. I found that there is 0.007331 GFLOP difference. FLOP per operator type: I counted FLOPS using this |
I count FLOPS using https://github.com/Lyken17/pytorch-OpCounter and ignore BatchNorm since it can be fused into Conv during inference. |
Can you share a custom op for HardSwish? |
HardSwish is formulated as |
Sorry for giving more questions, |
Sorry, It's HardSigmoid. HardSwish is |
Thank you very much for your time |
Thank you very much for sharing the source code.
I have a question related to FLOPs counting for ReLU and HardSwish. I saw in the paper the flops are the same in ReLU and HardSwish.
Can you explain this situation?
The text was updated successfully, but these errors were encountered: