das.morpholayers.regularizers#

class das.morpholayers.regularizers.L1L2Lattice(l1=0.0, l2=0.0)[source]#

Regularizer for L1 and L2 regularization in a lattice. Computes L1/L2 distance to MIN_LATT.

Parameters
  • l1 (float) – L1 regularization factor.

  • l2 (float) – L2 regularization factor.

get_config()[source]#

Get configuration of the regularizer.

Returns

Regularizer configuration.

Return type

dict

das.morpholayers.regularizers.l1_l2lattice(l1=0.01, l2=0.01)[source]#

Alias for L1L2Lattice with both L1 and L2 regularization.

Parameters
  • l1 (float) – L1 regularization factor.

  • l2 (float) – L2 regularization factor.

Returns

L1L2Lattice regularizer instance.

Return type

L1L2Lattice

das.morpholayers.regularizers.l1lattice(l=0.01)[source]#

Alias for L1L2Lattice with L1 regularization.

Parameters

l (float) – L1 regularization factor.

Returns

L1L2Lattice regularizer instance.

Return type

L1L2Lattice

das.morpholayers.regularizers.l2lattice(l=0.01)[source]#

Alias for L1L2Lattice with L2 regularization.

Parameters

l (float) – L2 regularization factor.

Returns

L1L2Lattice regularizer instance.

Return type

L1L2Lattice