# tf.compat.v1.losses.get_losses

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/losses/util.py#L189-L200) |

Gets the list of losses from the loss_collection.

    tf.compat.v1.losses.get_losses(
        scope=None, loss_collection=ops.GraphKeys.LOSSES
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `scope` | An optional scope name for filtering the losses to return. |
| `loss_collection` | Optional losses collection. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| a list of loss tensors. ||

<br />