RReLU#
- class torch.nn.RReLU(lower=0.125, upper=0.3333333333333333, inplace=False)[原始碼]#
逐元素應用隨機的 Leaky Rectified Linear Unit 函式。
論文中描述的方法:用於卷積網路的啟用函式經驗評估。
該函式定義為
其中 在訓練期間從均勻分佈 中隨機取樣,而在評估期間 固定為 .
- 引數
- 形狀
輸入: ,其中 表示任意數量的維度。
輸出: ,形狀與輸入相同。
示例
>>> m = nn.RReLU(0.1, 0.3) >>> input = torch.randn(2) >>> output = m(input)