# tf.keras.regularizers.L1L2

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/regularizers/L1L2) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/regularizers.py#L44-L67) |

Regularizer for L1 and L2 regularization.

Inherits From: [`Regularizer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/regularizers/Regularizer)

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.regularizers.L1L2`](https://www.tensorflow.org/api_docs/python/tf/keras/regularizers/L1L2), \`tf.compat.v2.keras.regularizers.L1L2\`

<br />

    tf.keras.regularizers.L1L2(
        l1=0.0, l2=0.0
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `l1` | Float; L1 regularization factor. |
| `l2` | Float; L2 regularization factor. |

<br />

## Methods

### `from_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/regularizers.py#L38-L40)

    @classmethod
    from_config(
        config
    )

### `get_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/regularizers.py#L66-L67)

    get_config()

### `__call__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/regularizers.py#L56-L64)

    __call__(
        x
    )

Call self as a function.