-
Notifications
You must be signed in to change notification settings - Fork 91
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
Normalization will not work #3
Comments
This should fix it: for _, module in self.fc.named_modules():
if isinstance(module, nn.Linear):
module.weight.data = F.normalize(module.weight, p=2, dim=1) |
thanks |
I find this problem, too. I modify it like this:
|
@cvqluu can you fix it in the code? thanks |
I think use weight normalize layer may be a more simlple way:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tested it and the normalization will not working:
The text was updated successfully, but these errors were encountered: