Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Question about the loss function in the transferLearning_MoleculeNet_PPI/chem #50

Open
wwma opened this issue Jun 27, 2022 · 1 comment

Comments

@wwma
Copy link

wwma commented Jun 27, 2022

hello,@yyou1996, thanks for your great work!
I have a question about the GraphCL in transferLearning_MoleculeNet_PPI/chem.When I run the code,the loss of each epoch is negative number. I wonder if I did something wrong,or that's what it is.
thanks!

@wwma wwma changed the title Question about the Question about the loss function in the transferLearning_MoleculeNet_PPI/chem Jun 27, 2022
@yyou1996
Copy link
Collaborator

Hi @wwma,

According to my understanding, loss = - torch.log(pos_sim / neg_sim), thus positive might indicate pos_sim / neg_sim > 1. It might happen when batch_size is small or augmentation is weak, or T factor is set small (e.g. <= 0.1). It looks fine to me. A simple way to turn loss positive is directly increase batch_size or lower the T factor in CL loss.

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

No branches or pull requests

2 participants