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)