pub fn step(
x: impl AsRef<Array>,
threshold: impl Into<Option<f32>>,
) -> Result<Array>Expand description
Applies the Step Activation Function.
This function implements a binary step activation, where the output is set to 1 if the input is greater than or equal to a specified threshold, and 0 otherwise.
This is:
select(x.ge(threshold), 1, 0)