mindspore.ops.xlogy
- mindspore.ops.xlogy(input, other)[source]
Compute input multiplied by the logarithm of other element-wise.
Note
Support broadcast, support implicit type conversion and type promotion.
Warning
On Ascend, the data type of input and other must be float16 or float32.
- Parameters
input (Union[Tensor, numbers.Number, bool]) – The first input tensor.
other (Union[Tensor, numbers.Number, bool]) – The second input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> output = mindspore.ops.xlogy(mindspore.tensor([-5., 0., 4.]), mindspore.tensor([2., 2., 2.])) >>> print(output) [-3.465736 0. 2.7725887]