Will Keras Regularizer l1_l2 work as either L1 or L2 when any of those is set to zero?

Viewed 38

Just like given in the ElasticNet documentation of Scikit-Learn as:

The ElasticNet mixing parameter, with 0 <= l1_ratio <= 1.

For l1_ratio = 0 the penalty is an L2 penalty.

For l1_ratio = 1 the penalty is an L1 penalty.

For 0 < l1_ratio < 1, the penalty is a combination of L1 and L2.

Similarly there is:

regularizers.l1_l2(l1=1e-5, l2=1e-4)
regularizers.l1(1e-5)
regularizers.l2(1e-4)

I would like to know if used with Dense layer, will below 2 regularizations behave exactly the same?

regularizers.l1_l2(l1=0, l2=1e-4)

regularizers.l2(1e-4)?

0 Answers
Related