torch.nn.functional.softshrink torch.nn.functional.softshrink(input, lambd=0.5) → Tensor Applies the soft shrinkage function elementwise See for more details.