AddcmulΒΆ

Performs the element-wise multiplication of tensor1 by tensor2, multiplies the result by the scalar value and adds it to input.

Abstract Signature:

Addcmul(input: Tensor, tensor1: Tensor, tensor2: Tensor, value: float = 1.0)

PyTorch

API: torch.addcmul
Strategy: Direct Mapping

JAX (Core)

API: β€”
Strategy: Macro 'jnp.add({input}, {value} * jnp.multiply({tensor1}, {tensor2}))'

NumPy

API: β€”
Strategy: Macro '{input} + {value} * {tensor1} * {tensor2}'

Keras

API: β€”
Strategy: Macro 'keras.ops.add({input}, keras.ops.multiply({tensor1}, {tensor2}) * {value})'

TensorFlow

API: β€”
Strategy: Macro 'tf.math.add({input}, tf.math.multiply({tensor1}, {tensor2}) * {value})'

Apple MLX

API: β€”
Strategy: Macro 'mx.add({input}, mx.multiply({tensor1}, {tensor2}) * {value})'

Flax NNX

API: β€”
Strategy: Macro 'jnp.add({input}, {value} * jnp.multiply({tensor1}, {tensor2}))'

PaxML / Praxis

API: β€”
Strategy: Macro 'jnp.add({input}, {value} * jnp.multiply({tensor1}, {tensor2}))'