Skip to content

Commit

Permalink
Fix sample code of poisson_nll_loss (#53551)
Browse files Browse the repository at this point in the history
  • Loading branch information
LyndonKong committed May 8, 2023
1 parent acefdeb commit 3fd2e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/nn/functional/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ def poisson_nll_loss(
input = paddle.randn([5, 2], dtype=paddle.float32)
label = paddle.randn([5, 2], dtype=paddle.float32)
loss = F.poisson_nll_loss(input, label, log_input=True, reduction='None')
loss = F.poisson_nll_loss(input, label, log_input=True, reduction='none')
print(loss)
loss = F.poisson_nll_loss(input, label, reduction='mean')
print(loss)
Expand Down

0 comments on commit 3fd2e76

Please sign in to comment.