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)