-
-
Notifications
You must be signed in to change notification settings - Fork 657
[skip ci] Doctest for Loss #2335
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
Conversation
trying to update loss.py doctest
|
@Eunjnnn Thank you very much for your help ! I left some comments, tell me if you need help. |
|
@Eunjnnn Are you still working on this ? It would be great to merge soon. |
|
@Eunjnnn Thanks for the update. It’s almost done, please do the fix I suggested. Thanks again ! |
ignite/metrics/loss.py
Outdated
| .. testcode:: | ||
| model = default_model | ||
| criterion = nll_loss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| criterion = nll_loss | |
| criterion = nn.NLLLoss() |
docs/source/conf.py
Outdated
| import torch | ||
| from torch import nn, optim | ||
| from torch.nn.functional import nll_loss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from torch.nn.functional import nll_loss |
See below, no need to introduce this import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Thank you!!
sdesrozis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eunjnnn Thank you ! LGTM
Fixes #2265
Description: add doctest for Loss
Check list: