Skip to content
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

remember to include The center loss parameters in the optimizer, othewise it will not work #22

Open
mohamedr002 opened this issue Oct 17, 2021 · 4 comments

Comments

@mohamedr002
Copy link

No description provided.

@toannguyen1904
Copy link

can you give us an example?

@cotyyang
Copy link

can you give us an example?

maybe he mean is this. in main.py 80 line optimizer_centloss = torch.optim.SGD(criterion_cent.parameters(), lr=args.lr_cent)

@mohamedr002
Copy link
Author

can you give us an example?

maybe he mean is this. in main.py 80 line optimizer_centloss = torch.optim.SGD(criterion_cent.parameters(), lr=args.lr_cent)

Yes, exactly, this is what I meant, the center loss parameters are trainable parameters and should be updated during training, by excluding these parameter from the optimizer, it will not change,

@fafafafafafafa
Copy link

why i put optimizer_centloss into optimizer, raise ValueError("optimizer got an empty parameter list"?
anyone can help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants