The function is defined as:
RReLU(x)={xaxif x≥0 otherwise where a is randomly sampled from uniform distribution
U(lower,upper) during training while during
evaluation a is fixed with a=2lower+upper.
- Parameters:
lower (float) – lower bound of the uniform distribution. Default: 81
upper (float) – upper bound of the uniform distribution. Default: 31
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.
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)
Runs the forward pass.
- Return type:
Tensor