Browse Source

!7984 Add output for comments of BCELoss

Merge pull request !7984 from wanyiming/add_output
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
53147129b8
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/nn/loss/loss.py

+ 1
- 0
mindspore/nn/loss/loss.py View File

@@ -487,6 +487,7 @@ class BCELoss(_Loss):
>>> inputs = Tensor(np.array([[0.1, 0.2, 0.3], [0.5, 0.7, 0.9]]), mindspore.float32)
>>> labels = Tensor(np.array([[0, 1, 0], [0, 0, 1]]), mindspore.float32)
>>> loss(inputs, labels)
1.8952923
"""

def __init__(self, weight=None, reduction='none'):


Loading…
Cancel
Save