# tf.losses.get_regularization_loss

<br />

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

Gets the total regularization loss.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.losses.get_regularization_loss`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/losses/get_regularization_loss)

<br />

    tf.losses.get_regularization_loss(
        scope=None, name='total_regularization_loss'
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `scope` | An optional scope name for filtering the losses to return. |
| `name` | The name of the returned tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A scalar regularization loss. ||

<br />