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)'
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)'