aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/losses/README.md
blob: 7b73c4483a934c0f3aada9810ee6ec74288392c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# TensorFlow contrib losses.

## losses

Loss operations for use in training models, typically with signature like the
following:

`sum_of_squares(predictions, labels, weight, scope) : Tensor`

All loss functions take a pair of tensors, `predictions` and ground truth
`labels`. It is assumed that the shape of both these tensors is of the form
`[batch_size, d1, ... dN]` where `batch_size` is the number
of samples in the batch and `d1` ... `dN` are the remaining dimensions.

The `weight` parameter can be used to adjust the relative weight samples within
the batch. The result of each loss is a scalar average of all sample losses with
non-zero weights.

Any parameter named `logit` should be the raw model outputs, not a normalized
probability distribution (i.e., `[0.0, 1.0]`). `target` for losses taking
`logit` _should_ be a normalized probability distribution.