torch.nn.functional.hardshrink torch.nn.functional.hardshrink(input, lambd=0.5) → Tensor Applies the hard shrinkage function element-wise See for more details.