mul

dragon.math.mul(
  inputs,
  **kwargs
)[source]

Compute the element-wise multiplication.

\[\text{out} = \text{input1} \times \text{input2} \]

Examples:

a = dragon.constant(4)
b = dragon.constant(2)
print(dragon.math.mul([a, b]))
print(a * b)  # Equivalent operation
Parameters:
  • inputs (Sequence[dragon.Tensor]) The input1 and input2 tensor.
Returns:

dragon.Tensor The output tensor.