Class MPSNNRegularizationType
- java.lang.Object
-
- apple.metalperformanceshaders.enums.MPSNNRegularizationType
-
public final class MPSNNRegularizationType extends java.lang.Object
-
-
Field Detail
-
None
public static final long None
- See Also:
- Constant Field Values
-
L1
public static final long L1
Apply L1 regularization. L1 norm of weights, will be considered to be added to the loss to be minimized. the gradient of the regularization loss turns to be 1 scaled with regularizationScale, so we add that to the incoming gradient of value.- See Also:
- Constant Field Values
-
L2
public static final long L2
Apply L2 regularization. L2 norm of weights, will be considered to be added to the loss to be minimized. the gradient of the regularization loss turns to be the original value scaled with regularizationScale, so we add that to the incoming gradient of value.- See Also:
- Constant Field Values
-
-