issue in calculation over mobilenet.
Closed this issue · 4 comments
Hi,
I am using "flopth -m mobilenet_v3_large" to finds flops in the model.
I am getting this number: FLOPs: 228.354M Params: 5.48303M
along with lots of:
Op Hardswish is not supported at now.
Op Hardsigmoid is not supported at now.
Op Hardswish is not supported at now.
Op Hardswish is not supported at now.
Op Hardsigmoid is not supported at now.
Op Hardswish is not supported at now.
Op Hardswish is not supported at now.
Op Hardsigmoid is not supported at now.
Op Hardswish is not supported at now.
Op Hardswish is not supported at now.
Op Hardsigmoid is not supported at now.
Op Hardswish is not supported at now.
Op Hardswish is not supported at now.
Is the script correctly calculating the number or this error is affecting the correct count?
Waiting for your reply.
Thanks
Hi @NeelKanwal ,Thanks for your feedback. The results do not include the unsupported ops. I will add these ops as soon as possible.
Thanks for your quick response.
I think, there is a similar response while testing it on vision transformer. Here is the code and the output.
import timm
model = timm.create_model('vit_tiny_patch16_224', pretrained=True, num_classes=2)
flops, params = flopth(model)
Op Identity is not supported at now.
Op Identity is not supported at now.
Op LayerNorm is not supported at now.
Op Identity is not supported at now.
Op Identity is not supported at now.
Op LayerNorm is not supported at now.
Op GELU is not supported at now.
Op Identity is not supported at now.
Op Identity is not supported at now.
Hi @NeelKanwal , Thanks for your another feedback. I added those mentioned operators. You can reinstall flopth by pip install -U flopth==0.1.3
. If you are using a pypi mirror and the version 0.1.3 is not find, try to use pypi.org index like this pip install -U flopth==0.1.3 -i https://pypi.org/simple
.
Thank you.
Now it works