快捷方式

Mish

class torch.nn.Mish(inplace=False)[source][source]

逐元素應用 Mish 函式。

Mish:一種自正則化非單調神經網路啟用函式。

Mish(x)=xTanh(Softplus(x))\text{Mish}(x) = x * \text{Tanh}(\text{Softplus}(x))
形狀
  • 輸入:()(*),其中 * 表示任意維數。

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

../_images/Mish.png

示例

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

文件

查閱 PyTorch 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源