-
Notifications
You must be signed in to change notification settings - Fork 618
FIX: weightnorm variables #219
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
Conversation
|
Thanks for ping me, Sean, I'll look into it tomorrow. By the way, is it related with #220 ? |
No, it's just the typo in example :-) |
No problem that was auto from CODEOWNERS. @qlzh727 might want to review as this was just worked on. Changes:
|
|
I am ok with point 3 which changes the .assign() to =, but I am still bit confused about 1 and 2. a. Both data init and init_norm are trying to init the value of g, and I don't see the reason to make init_norm to call _compute_weights(), which will update the self.layer.kernel. |
@qlzh727 Ah sry thats a bit of laziness on my part. During troubleshooting I just made everything match the same steps as it was before to try to debug. I've removed 1+2 and confirmed the expected results: |
|
Is it a bug? I think we are encouraged to use |
|
using Doing I recommend this code be changed to just say |
Closes #216
Looks like assigning the variables using operations during init created an issue in the gradients. Setting their values inside of tf.function as done before appears to fix it. I'm not really thrilled about the lack of test coverage, but also not excited to build a regression test into our unit tests.
https://colab.research.google.com/drive/1Md7SnyEC5bUfkME1Akth4KKM24ac26NK
After this bugfix is in I'll work on publishing a 0.3 release