捷徑

Softsign

class torch.nn.Softsign(*args, **kwargs)[原始碼][原始碼]

應用元素級 Softsign 函數。

SoftSign(x)=x1+x\text{SoftSign}(x) = \frac{x}{ 1 + |x|}
形狀 (Shape)
  • 輸入 (Input): ()(*),其中 * 代表任意數量的維度。

  • 輸出 (Output): ()(*),與輸入形狀相同。

../_images/Softsign.png

範例 (Examples)

>>> m = nn.Softsign()
>>> input = torch.randn(2)
>>> output = m(input)

文件

獲取 PyTorch 的完整開發者文件

檢視文件

教學課程

獲取初學者和高級開發人員的深入教學課程

檢視教學課程

資源

尋找開發資源並獲得問題解答

檢視資源