RReLU¶
- 类 torch.nn.RReLU(lower=0.125, upper=0.3333333333333333, inplace=False)[源代码][源代码]¶
应用随机化 Leaky 修正线性单元函数,按元素进行。
该方法在以下论文中描述: Empirical Evaluation of Rectified Activations in Convolutional Network。
函数定义为
其中 在训练期间从均匀分布 中随机采样,而在评估期间 固定为 。
- 形状
输入:,其中 表示任意数量的维度。
输出:,与输入形状相同。
示例
>>> m = nn.RReLU(0.1, 0.3) >>> input = torch.randn(2) >>> output = m(input)