Mish¶ class torch.nn.Mish(inplace=False)[原始碼][原始碼]¶ 逐元素套用 Mish 函數。 Mish:自我正規化的非單調神經激活函數。 Mish(x)=x∗Tanh(Softplus(x))\text{Mish}(x) = x * \text{Tanh}(\text{Softplus}(x)) Mish(x)=x∗Tanh(Softplus(x)) 注意 請參閱 Mish: A Self Regularized Non-Monotonic Neural Activation Function 形狀 輸入: (∗)(*)(∗), 其中 ∗*∗ 代表任意數量的維度。 輸出: (∗)(*)(∗), 與輸入形狀相同。 範例 >>> m = nn.Mish() >>> input = torch.randn(2) >>> output = m(input)