torch.nn.functional.tanhshrink¶ torch.nn.functional.tanhshrink(input) → Tensor[源代码]¶ 按元素应用 Tanhshrink(x)=x−Tanh(x)\text{Tanhshrink}(x) = x - \text{Tanh}(x)Tanhshrink(x)=x−Tanh(x) 有关更多详细信息,请参阅 Tanhshrink。