Softsign¶ class torch.nn.Softsign(*args, **kwargs)[原始碼][原始碼]¶ 應用元素級 Softsign 函數。 SoftSign(x)=x1+∣x∣\text{SoftSign}(x) = \frac{x}{ 1 + |x|} SoftSign(x)=1+∣x∣x 形狀 (Shape) 輸入 (Input): (∗)(*)(∗),其中 ∗*∗ 代表任意數量的維度。 輸出 (Output): (∗)(*)(∗),與輸入形狀相同。 範例 (Examples) >>> m = nn.Softsign() >>> input = torch.randn(2) >>> output = m(input)