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