-
Notifications
You must be signed in to change notification settings - Fork 35
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
DoReFa quantizer with higher number of MACs/Ops, Grouped convs as custom ops on LCE 0.7.0 #745
Comments
I noticed some issues with the latest version only (0.7.0) but not the one before (0.6.2). Example:
Quantizer small example (2 qconv layers): Example with ste_sign mode="weights":
Changing to DoReFa mode="weights":
I was able to successfully benchmark my model with DoReFa and grouped convolutions converted on version 0.6.2 with a better-than-expected efficiency but not the one converted with version 0.7.0 |
Sorry for the late reply.
Unfortunately this was an issue with TensorFlow 2.8 which LCE 0.7.0 uses under the hood. This has been fixed on master since we upgraded to 2.9, but we haven't published a new release with it yet. Sorry about that. For now, I'd recommend sticking with 0.6.2 if grouped convolution support is required.
For binarised convolutions this is recommended for the activation. You can also use custom activation quantisers as well, but to make sure they convert correctly they should be implemented with I recommend looking at the converted model in Netron to make sure the conversion worked as intended. |
@lluevano sorry for the delay. We just release v0.8.0 including a fix for this. Let me know if that works for you. |
Hello, I have a couple of questions regarding quantizer options for Larq and LCE.
I am designing a BNN using the DoReFa quantizer, however, I noticed a very high number of estimated MACs and Ops when converting the model for ARM64. Changing the quantizer to "ste_sign" dramatically lowered the number of MACs and Ops.
I was wondering if there is a way to use the DoReFa quantizer for training without the serious overhead of operations when converting and running the model for inference in LCE? Is the "ste_sign" quantizer the only viable option for efficient inference?
Thank you for the excellent work and for your attention.
The text was updated successfully, but these errors were encountered: