thresholded_relu

Function thresholded_relu 

pub fn thresholded_relu<const D: usize, B>(
    tensor: Tensor<B, D>,
    alpha: f64,
) -> Tensor<B, D>
where B: Backend,
Expand description

Applies the thresholded rectified linear unit function element-wise.

f(x) =

  • x if x > alpha
  • 0 otherwise

ยงArguments

  • alpha: threshold value (default in ONNX is 1.0).