# tf.compat.v1.distribute.get_loss_reduction

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/distribute/distribute_utils.py#L39-L58) |

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

    tf.compat.v1.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/r2.14/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/r2.14/api_docs/python/tf/distribute/ReduceOp#SUM) otherwise. ||

<br />