File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1319,14 +1319,14 @@ class probabilities only when a single class label per minibatch item is too res
1319
1319
1320
1320
.. note::
1321
1321
When ``target`` contains class probabilities, it should consist of soft labels—that is,
1322
- each `target` entry should represent a probability distribution over the possible classes for a given data sample,
1323
- with individual probabilities between `[0,1]` and the total distribution summing to 1.
1322
+ each `` target` ` entry should represent a probability distribution over the possible classes for a given data sample,
1323
+ with individual probabilities between `` [0,1]` ` and the total distribution summing to 1.
1324
1324
This is why the :func:`softmax()` function is applied to the ``target`` in the class probabilities example above.
1325
1325
1326
- PyTorch does not validate whether the values provided in `target` lie in the range `[0,1]`
1327
- or whether the distribution of each data sample sums to `1 `.
1326
+ PyTorch does not validate whether the values provided in `` target`` lie in the range `` [0,1]` `
1327
+ or whether the distribution of each data sample sums to ``1` `.
1328
1328
No warning will be raised and it is the user's responsibility
1329
- to ensure that `target` contains valid probability distributions.
1329
+ to ensure that `` target` ` contains valid probability distributions.
1330
1330
Providing arbitrary values may yield misleading loss values and unstable gradients during training.
1331
1331
1332
1332
Examples:
You can’t perform that action at this time.
0 commit comments