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 functions for classification - logits/probabilities (page 472) #29
Comments
Thanks, again! Yeah, looking at it, it doesn't make sense to have the same values there. If we assume that the logits are 0.8, then the input for BCELoss should be 0.69. Or, vice versa, if we assume that the predicted class membership proba from calling sigmoid(y_pred) = 0.8, then the logits should be 1.386. Let me CC Hayden, who has the original figure. @haydenliu Can you update the figure and open a PR? Thanks!! |
Probably y_pred=0.8 for BCEWithLogitsLoss is more consistent with the code you provided in the book on the same page (and the second row for multiclass classification is already consistent with the code):
|
Good point |
Thanks Dmitry and Seb. |
Thanks, just merged! |
Hi Sebastian,
There is the same value on the picture on the page 472 for
y_pred
in the columns for probabilities (BCELoss) and logits (BCEWithLogitsLoss): 0.8Probably the value for the first column (BCELoss) is 0.69, which is equal to sigmoid(0.8)?
Thank you.
The text was updated successfully, but these errors were encountered: