StepActivationΒΆ

Applies the Step Activation Function.

Abstract Signature:

StepActivation(x: Tensor, threshold: float = 0.0)

PyTorch

API: β€”
Strategy: Macro 'torch.where({x} >= {threshold}, 1.0, 0.0)'

JAX (Core)

API: β€”
Strategy: Macro 'jnp.where({x} >= {threshold}, 1.0, 0.0)'

NumPy

API: β€”
Strategy: Macro '({x} >= {threshold}).astype(float)'

Keras

API: β€”
Strategy: Macro 'keras.ops.cast({x} >= {threshold}, dtype='float32')'

TensorFlow

API: β€”
Strategy: Macro 'tf.cast({x} >= {threshold}, dtype=tf.float32)'

Apple MLX

API: mlx.nn.step
Strategy: Direct Mapping

Flax NNX

API: β€”
Strategy: Macro 'jnp.where({x} >= {threshold}, 1.0, 0.0)'

PaxML / Praxis

API: β€”
Strategy: Macro 'jnp.where({x} >= {threshold}, 1.0, 0.0)'