# tf.distribute.get_loss_reduction

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/distribute/distribute_lib.py#L172-L191) |

[`tf.distribute.ReduceOp`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/distribute/ReduceOp) corresponding to the last loss reduction.

#### View aliases


**Main aliases**

\`tf.contrib.distribute.get_loss_reduction\`
**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.distribute.get_loss_reduction`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/distribute/get_loss_reduction)

<br />

    tf.distribute.get_loss_reduction()

This is used to decide whether loss should be scaled in optimizer (used only
for estimator + v1 optimizer use case).

<br />

<br />

<br />

| ## Returns ||
|---|---|
| [`tf.distribute.ReduceOp`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/distribute/ReduceOp) corresponding to the last loss reduction for estimator and v1 optimizer use case. [`tf.distribute.ReduceOp.SUM`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/distribute/ReduceOp#SUM) otherwise. ||

<br />