-
Notifications
You must be signed in to change notification settings - Fork 18
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
QuickNet model and flip_ratio metric do not work together #148
Comments
Thanks for the detailed issue.
I noticed that in a different case too a few days ago. I think it is because we set the input quantizers like this so they are stored on the class which will fail since the metric has internal variables: Lines 71 to 72 in 959ae94
|
@AdamHillier do you think we should change Another solution would be to change quantizers here to normal @itayalfia We'll take a closer look at this next week, since this is something we've come accross before and we should fix in a proper way. For now you can use #149, which should provide an intermediate fix for the issue. |
I've made a Zookeeper issue for this here: larq/zookeeper#134. |
Describe the bug
When using a model that includes QuickNet with flip_ratio metric,
model creation fails because of mismatched dimensions -
Dimensions must be equal, but are 64 and 128 for 'Equal' (op: 'Equal') with input shapes: [3,3,64,64], [3,3,128,128]
.My suspicion is that one quantizer is created and reused for the entire model, and flip_ratio looks at the same quantizer with inputs of different shapes and fails because of this.
To Reproduce
Expected behavior
I would have expected the example to run without problems, as happens when quicknet is replaced with a series of binary operations, but instead I get the following error:
Environment
TensorFlow version: 2.1.0
Larq version: 0.9.3
Larq-Zoo version: 1.0b4
The text was updated successfully, but these errors were encountered: