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

Update losses.py #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zhangzhenyu13
Copy link

avoid nan loss in SupCon

avoid nan loss in SupCon
@zhangzhenyu13
Copy link
Author

Nan loss will results in updating failure, please check my modifications.

@3koozy
Copy link

3koozy commented Nov 3, 2021

Thank you highlighting this issue :).
I was trying to quickly use the losses.py into my project (which is lacking the SupCon augmentation process that leads to having 1 sample of certain class in the batch) which results in NAN loss.

I will try to use your version and get feedback.

many Thanks

@Rainwind1995
Copy link

Nan loss will results in updating failure, please check my modifications.

Hello, the code provided by the author only has the train() function, but there is no test() function. How to implement this? can you tell 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

Successfully merging this pull request may close these issues.

3 participants