Softshrink
- class torch.nn.modules.activation.Softshrink(lambd=0.5)
Applies the soft shrinkage function element-wise.
Applies the soft shrinkage function element-wise.
lambd (float) – the (must be no less than zero) value for the Softshrink formulation. Default: 0.5
Input: , where means any number of dimensions.
Output: , same shape as the input.

Examples:
>>> m = nn.Softshrink()
>>> input = torch.randn(2)
>>> output = m(input)
Return the extra representation of the module.
Run forward pass.