tf.keras.regularizers.l2
Create a regularizer that applies an L2 regularization penalty.
tf.keras.regularizers.l2(
l=0.01
)
The L2 regularization penalty is computed as:
$$\ell_2\,\,penalty =\ell_2\sum_{i=0}^nx_i^2$$
Arguments |
l
|
Float; L2 regularization factor.
|
Returns |
An L2 Regularizer with the given regularization factor.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]