RReLU
-
class torch.nn.RReLU(lower=0.125, upper=0.3333333333333333, inplace=False) [source]
-
Applies the randomized leaky rectified linear unit function, element-wise.
Method described in the paper: Empirical Evaluation of Rectified Activations in Convolutional Network.
The function is defined as:
where is randomly sampled from uniform distribution during training while during evaluation is fixed with .
- Parameters
-
-
lower (float) – lower bound of the uniform distribution. Default:
-
upper (float) – upper bound of the uniform distribution. Default:
-
inplace (bool) – can optionally do the operation in-place. Default:
False
- Shape:
-
- Input: , where means any number of dimensions.
- Output: , same shape as the input.
Examples:
>>> m = nn.RReLU(0.1, 0.3)
>>> input = torch.randn(2)
>>> output = m(input)
-
Return the extra representation of the module.
- Return type
-
str
-
forward(input) [source]
-
Runs the forward pass.
- Return type
-
Tensor