TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.distribute.get_loss_reduction

View source on GitHub

tf.distribute.ReduceOp corresponding to the last loss reduction.

Aliases:

  • tf.compat.v1.distribute.get_loss_reduction
  • tf.contrib.distribute.get_loss_reduction
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).

Returns:

tf.distribute.ReduceOp corresponding to the last loss reduction for estimator and v1 optimizer use case. tf.distribute.ReduceOp.SUM otherwise.