Class L1
java.lang.Object
org.tensorflow.framework.regularizers.AbstractRegularizer
org.tensorflow.framework.regularizers.L1L2
org.tensorflow.framework.regularizers.L1
- All Implemented Interfaces:
Regularizer
A regularizer that applies an L1 or Lasso(least absolute shrinkage and selection operator)
Regression, regularization penalty.
The L1 regularization penalty is computed as: loss = l1 * reduceSum(abs(x))
-
Field Summary
Fields inherited from class AbstractRegularizer
DEFAULT_REGULARIZATION_PENALTY -
Constructor Summary
ConstructorsConstructorDescriptionL1()Create a regularizer that applies an L1 regularization penalty ofAbstractRegularizer.DEFAULT_REGULARIZATION_PENALTYand a name based on the class name.L1(float l1) Create a regularizer that applies an L1 regularization penalty and a name based on the class name.Create a regularizer that applies an L1 regularization penalty ofAbstractRegularizer.DEFAULT_REGULARIZATION_PENALTYCreate a regularizer that applies an L1 regularization penalty -
Method Summary
Methods inherited from class AbstractRegularizer
asLoss, getName
-
Constructor Details
-
L1
public L1()Create a regularizer that applies an L1 regularization penalty ofAbstractRegularizer.DEFAULT_REGULARIZATION_PENALTYand a name based on the class name. -
L1
Create a regularizer that applies an L1 regularization penalty ofAbstractRegularizer.DEFAULT_REGULARIZATION_PENALTY- Parameters:
name- the name for this AbstractRegularizer
-
L1
public L1(float l1) Create a regularizer that applies an L1 regularization penalty and a name based on the class name.- Parameters:
l1- the L1 regularization penalty- Throws:
IllegalArgumentException- if the l1 regularization factor is NaN or is infinite.
-
L1
Create a regularizer that applies an L1 regularization penalty- Parameters:
name- the name for this AbstractRegularizerl1- the L1 regularization penalty- Throws:
IllegalArgumentException- if the l1 regularization factor is NaN or is infinite.
-