-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
Slow Segmentation with MobileNetV3 #405
Comments
Hi Kevin, thanks for the good report. Your C++-compiler invocation looks ok for speed. It has the important Since you have
Can you give this a try? If it does not help, could you upload your model (the not-yet converted version) for me to experiment with it and find the bottleneck? |
Thanks! I've tried that before and it has the same speed. I've sent an email to you containing the link to my model and some testing code. Let me know if you need anything else. |
Thank you. With the model you sent me, I just reproduced the performance problem locally. It's actually even worse on my machine, i.e.:
I'll investigate and get back to you here. |
Profiling ( In this MR, I introduced this unnecessarily large calculation (very redundant) accidentally. 😬 I just fixed it with this commit and released a new version. Now, a forward pass with your model in frugally-deep is fast (~ 0.075 s on my machine). 🎉 Thanks a lot for reporting this and providing such a good explanation (plus the example model)! ❤️ |
Thank you! |
Hi Tobias,
I'm trying to implement a segmentation model with mobilenetv3 (tensorflow mobilenetv3_large minimalistic) with a LR-ASPP segmentation head that I trained in python. When converting my model, the forward passes take < 1s, but when I load it in C++, the forward pass takes 8s. I am using WSL running Ubuntu 22.04. I'm pretty new to development in C++ so there's likely some compilation mistakes I may have made, but I would love to get your feedback on why this speed discrepancy exists. I've posted the model conversion and loading outputs below. I can send you the model json as well.
Appreciate the work you've put into this library. Thanks!
Kevin
The text was updated successfully, but these errors were encountered: