-
Notifications
You must be signed in to change notification settings - Fork 23
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
Loss calculation is wrong #3
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the code has a little issue in loss calculation: when " # Obtain similarity score predictions by calculating the Manhattan distance between sentence encoding"
self.prediction = torch.exp(-torch.norm((self.encoding_a - self.encoding_b), 1))
here the prediction is between [0,1) (e^-(a(hi)-b(hi))) , I think the code should not calculate the loss (prediction)with labeled data without data range alignment , do you think we should process prediction with : prediction*4+1? Cause data in dataset is all labeled with value [0,5]
The text was updated successfully, but these errors were encountered: