l2

dragon.vm.tensorflow.keras.regularizers.l2(l=0.01)[source]

Create a L2 regularizer.

The L2 regularizer is defined as:

\[loss_{reg} = loss + \frac{\beta}{2}|w|_{2} \]
Parameters:
  • l (float, optional, default=0.01) – The value of \(\beta\).
Returns:

dragon.vm.tensorflow.keras.regularizers.Regularizer – The regularizer.