sub¶
dragon.math.
sub
(
inputs,
**kwargs
)[source]¶Compute the element-wise subtraction.
\[\text{out} = \text{input1} - \text{input2} \]Examples:
a = dragon.constant(1) b = dragon.constant(2) print(dragon.math.sub([a, b])) print(a - b) # Equivalent operation
- Parameters:
- inputs (Sequence[dragon.Tensor]) – The input1 and input2 tensor.
- Returns:
dragon.Tensor – The output tensor.