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

About get_flpos.py #4689

Closed
pengzhiliang opened this issue Feb 28, 2021 · 4 comments
Closed

About get_flpos.py #4689

pengzhiliang opened this issue Feb 28, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@pengzhiliang
Copy link

Hello,
I'd like to know if there is a self-attention module in backbone, is it accurate to use get_flops.py to calculate flops?

@ZwwWayne
Copy link
Collaborator

The flop counter relies on the implementation is MMCV here. It seems that multihead attention or customized attention module's FLOP is not included.

@ZwwWayne ZwwWayne added the enhancement New feature or request label Feb 28, 2021
@pengzhiliang
Copy link
Author

Ok, I find that, thank u~

In fact, if the torch.bmm operator is included, the flops will be accurate.
And, the LayerNorm is also ignored in get_model_complexity_info function.

@ZwwWayne
Copy link
Collaborator

ZwwWayne commented Mar 9, 2021

Thanks for your suggestion. Would you like to create a PR to MMCV? If not, we may add this feature in MMCV in the next month.

@pengzhiliang
Copy link
Author

ooooh! I'm sorry that I don't know how to implement it in fact.

Therefore, looking forward to the update of mmcv !

Thank u~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants