torch.nn.functional.silu¶
- torch.nn.functional.silu(input, inplace=False)[原始檔][原始檔]¶
逐元素應用 Sigmoid 線性單元 (SiLU) 函式。
SiLU 函式也稱為 swish 函式。
注意
參見 Gaussian Error Linear Units (GELUs)(SiLU (Sigmoid 線性單元) 最初在此提出),另參見 Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning 和 Swish: a Self-Gated Activation Function(SiLU 後來在此進行實驗)。
更多詳細資訊請參閱
SiLU。- 返回型別