捷徑

Mish

class torch.nn.Mish(inplace=False)[原始碼][原始碼]

逐元素套用 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 的完整開發人員文件

查看文件

教學

取得針對初學者和進階開發人員的深入教學

查看教學

資源

尋找開發資源並取得您的問題解答

查看資源