Skip to content

Commit 5b171ad

Browse files
fehiepsisoumith
authored andcommitted
remove misleading guide for BCELoss (pytorch#924)
1 parent ac9245a commit 5b171ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torch/nn/modules/loss.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ class BCELoss(_WeightedLoss):
191191
..math:: loss(o, t) = - 1/n \sum_i weights[i] * (t[i] * log(o[i]) + (1 - t[i]) * log(1 - o[i]))
192192
193193
This is used for measuring the error of a reconstruction in for example
194-
an auto-encoder. Note that the targets `t[i]` should be numbers between 0 and 1,
195-
for instance, the output of an `nn.Sigmoid` layer.
194+
an auto-encoder. Note that the targets `t[i]` should be numbers between 0 and 1.
196195
197196
By default, the losses are averaged for each minibatch over observations
198197
*as well as* over dimensions. However, if the field `sizeAverage` is set

0 commit comments

Comments
 (0)