regularizer_l1_l2 | R Documentation |
The L1 regularization penalty is computed as:
loss = l1 * reduce_sum(abs(x))
The L2 regularization penalty is computed as
loss = l2 * reduce_sum(square(x))
L1L2 may be passed to a layer as a string identifier:
dense <- layer_dense(units = 3, kernel_regularizer = 'L1L2')
In this case, the default values used are l1=0.01
and l2=0.01
.
regularizer_l1_l2(l1 = 0, l2 = 0)
l1 |
float, L1 regularization factor. |
l2 |
float, L2 regularization factor. |
A Regularizer
instance that can be passed to layer constructors or
used as a standalone object.
Other regularizers:
regularizer_l1()
regularizer_l2()
regularizer_orthogonal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.