mindspore.ops.logaddexp2

View Source On Gitee
mindspore.ops.logaddexp2(input, other)[source]

Computes the logarithm of the sum of exponentiations in base of 2 of the inputs.

outi=log2(2inputi+2otheri)
Parameters
  • input (Tensor) – The input tensor.

  • other (Tensor) – The input tensor.

Returns

Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> x1 = mindspore.tensor([1, 2, 3], mindspore.float16)
>>> x2 = mindspore.tensor(2, mindspore.float16)
>>> output = mindspore.ops.logaddexp2(x1, x2)
>>> print(output)
[2.586 3.    3.586]