tf.contrib.losses.compute_weighted_loss()

tf.contrib.losses.compute_weighted_loss(losses, weight=1.0)

Computes the weighted loss.

Args:
  • losses: A tensor of size [batch_size, d1, ... dN].
  • weight: A tensor of size [1] or [batch_size, d1, ... dK] where K < N.
Returns:

A scalar Tensor that returns the weighted loss.

Raises:
  • ValueError: If the weight is None or the shape is not compatible with the losses shape or if the number of dimensions (rank) of either losses or weight is missing.
doc_TensorFlow
2016-10-14 13:07:09
Comments
Leave a Comment

Please login to continue.