ELU#
- class torch.nn.ELU(alpha=1.0, inplace=False)[原始碼]#
逐元素應用指數線性單元 (ELU) 函式。
該方法在論文中進行了描述:Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)(透過指數線性單元(ELU)快速準確地進行深度網路學習)。
ELU 的定義為:
- 形狀
輸入: ,其中 表示任意數量的維度。
輸出: ,形狀與輸入相同。
示例
>>> m = nn.ELU() >>> input = torch.randn(2) >>> output = m(input)