contrib.losses.compute_weighted_loss
tf.contrib.losses.compute_weighted_loss
tf.contrib.losses.compute_weighted_loss
compute_weighted_loss( losses, weights=1.0, scope=None )
Defined in tensorflow/contrib/losses/python/losses/loss_ops.py
.
See the guide: Losses (contrib) > Loss operations for use in neural networks.
Computes the weighted loss. (deprecated)
THIS FUNCTION IS DEPRECATED. It will be removed after 2016-12-30. Instructions for updating: Use tf.losses.compute_weighted_loss instead.
Args:
-
losses
: A tensor of size [batch_size, d1, ... dN]. -
weights
: A tensor of size [1] or [batch_size, d1, ... dK] where K < N. -
scope
: the scope for the operations performed in computing the loss.
Returns:
A scalar Tensor
that returns the weighted loss.
Raises:
-
ValueError
: Ifweights
isNone
or the shape is not compatible withlosses
, or if the number of dimensions (rank) of eitherlosses
orweights
is missing.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/losses/compute_weighted_loss