RsubΒΆ

Subtracts input from other (other - input) scaling input by alpha.

Abstract Signature:

Rsub(input: Tensor, other: Tensor, alpha: float = 1)

PyTorch

API: torch.rsub
Strategy: Direct Mapping

JAX (Core)

API: β€”
Strategy: Macro '{other} - ({input} * {alpha})'

NumPy

API: β€”
Strategy: Macro 'numpy.subtract({other}, {input} * {alpha})'

Keras

API: β€”
Strategy: Macro 'keras.ops.subtract({other}, {input} * {alpha})'

TensorFlow

API: β€”
Strategy: Macro 'tf.math.subtract({other}, {input} * {alpha})'

Apple MLX

API: β€”
Strategy: Macro 'mlx.core.subtract({other}, {input} * {alpha})'

Flax NNX

API: β€”
Strategy: Macro '{other} - ({input} * {alpha})'

PaxML / Praxis

API: β€”
Strategy: Macro '{other} - ({input} * {alpha})'