[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.losses.compute_weighted_loss\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/losses/python/losses/loss_ops.py#L84-L122) |\n\nComputes the weighted loss. (deprecated) \n\n tf.contrib.losses.compute_weighted_loss(\n losses, weights=1.0, scope=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed after 2016-12-30. Instructions for updating: Use tf.losses.compute_weighted_loss instead.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------|--------------------------------------------------------------------|\n| `losses` | A tensor of size \\[batch_size, d1, ... dN\\]. |\n| `weights` | A tensor of size \\[1\\] or \\[batch_size, d1, ... dK\\] where K \\\u003c N. |\n| `scope` | the scope for the operations performed in computing the loss. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A scalar `Tensor` that returns the weighted loss. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ValueError` | If `weights` is `None` or the shape is not compatible with `losses`, or if the number of dimensions (rank) of either `losses` or `weights` is missing. |\n\n\u003cbr /\u003e"]]