Class AbstractRegularizer
java.lang.Object
org.tensorflow.framework.regularizers.AbstractRegularizer
- All Implemented Interfaces:
Regularizer
- Direct Known Subclasses:
L1L2
Base class for Regularizers
Regularizers allow you to apply penalties on layer parameters or layer activity during optimization. These penalties are summed into the loss function that the network optimizes.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a AbstractRegularizer, usingClass.getSimpleName()for the nameprotectedAbstractRegularizer(String name) Creates a AbstractRegularizer -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Regularizer
call
-
Field Details
-
DEFAULT_REGULARIZATION_PENALTY
public static final float DEFAULT_REGULARIZATION_PENALTY- See Also:
-
-
Constructor Details
-
AbstractRegularizer
protected AbstractRegularizer()Creates a AbstractRegularizer, usingClass.getSimpleName()for the name -
AbstractRegularizer
Creates a AbstractRegularizer- Parameters:
name- the name of this regularizer, if null useClass.getSimpleName()for the name.
-
-
Method Details
-
asLoss
public org.tensorflow.framework.losses.impl.AbstractLoss asLoss()Returns this AbstractRegularizer as a AbstractLoss This is a convenience to use regularize a loss. Only sampleWeights are applied to the regularizer.- Returns:
- this AbstractRegularizer as a AbstractLoss
-
getName
-