L2

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

The L2 regularizer.

The L2 regularizer is defined as:

\[loss_{reg} = loss + \frac{\beta}{2}|w|_{2} \]

__init__

L2.__init__(l2=0.01)[source]

Create a L2 regularizer.

Parameters:
  • l1 (float, optional, default=0.01) – The value to \(\alpha\).