Package smile.deep.activation
Class SoftShrink
java.lang.Object
smile.deep.activation.ActivationFunction
smile.deep.activation.SoftShrink
- All Implemented Interfaces:
Serializable
,Function<Tensor,
,Tensor> Layer
Soft Shrink activation function.
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class smile.deep.activation.ActivationFunction
asTorch, isInplace, name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface smile.deep.layer.Layer
apply, isTraining
-
Constructor Details
-
SoftShrink
public SoftShrink()Constructor. -
SoftShrink
public SoftShrink(double lambda) Constructor.- Parameters:
lambda
- The lambda value in the formulation.
-
-
Method Details
-
forward
Description copied from interface:Layer
Forward propagation (or forward pass) through the layer.- Parameters:
x
- the input tensor.- Returns:
- the output tensor.
-