Skip to content

Commit

Permalink
typo loss
Browse files Browse the repository at this point in the history
  • Loading branch information
mlelarge committed Feb 23, 2024
1 parent 4198ba8 commit 9a02bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/3-loss-functions-for-classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ loss1 = nn.NLLLoss()
loss2 = nn.CrossEntropyLoss()
C = 8
input = torch.randn(3,C,4,5)
target = torch.empty(3,4,5 dtype=torch.long).random_(0,C)
target = torch.empty(3,4,5, dtype=torch.long).random_(0,C)
assert loss1(m(input),target) == loss2(input,target)
```

Expand Down

0 comments on commit 9a02bec

Please sign in to comment.