Regularizers

L1

layer eddl::L1(layer l, float l1)

Regularizer for L1 regularization.

Parameters
  • l – Parent layer to regularize

  • l1 – L1 regularization factor

Returns

The layer l regularized

Example:

l = L1(l, 0.0001);

L2

layer eddl::L2(layer l, float l2)

Regularizer for L2 regularization.

Parameters
  • l – Parent layer to regularize

  • l2 – L2 regularization factor

Returns

The layer l regularized

Example:

l = L2(l, 0.0001);

L1L2

layer eddl::L1L2(layer l, float l1, float l2)

Regularizer for L1 and L2 regularization.

Parameters
  • l – Parent layer to regularize

  • l1 – L1 regularization factor

  • l2 – L2 regularization factor

Returns

The layer l regularized

Example:

l = L1(l, 0.00001, 0.0001);