mindspore.ops.logaddexp2
- mindspore.ops.logaddexp2(input, other)[source]
Computes the logarithm of the sum of exponentiations in base of 2 of the inputs.
\[out_i = log_2(2^{input_i} + 2^{other_i})\]- Parameters
- Returns
Tensor.
- Raises
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> x1 = Tensor(np.array([2, 4, 8]).astype(np.float16)) >>> x2 = Tensor(np.array([2]).astype(np.float16)) >>> output = ops.logaddexp2(x1, x2) >>> print(output) [3. 4.32 8.02]