Skip to content

Commit 616e513

Browse files
authored
Make it clearer that losses reduce along the batch dimension (#2004)
Fixes keras-team/keras#20395.
1 parent 3ea573f commit 616e513

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/api/losses/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ A loss is a callable with arguments `loss_fn(y_true, y_pred, sample_weight=None)
7676
by the corresponding value of `sample_weight`. (Note on`dN-1`: all loss
7777
functions reduce by 1 dimension, usually `axis=-1`.)
7878

79-
By default, loss functions return one scalar loss value per input sample, e.g.
79+
By default, loss functions return one scalar loss value for each input sample
80+
in the batch dimension, e.g.
8081

8182
```
8283
>>> from keras import ops

0 commit comments

Comments
 (0)