mindspore.ops.xlogy
- mindspore.ops.xlogy(input, other)[源代码]
逐元素对 other 取对数,再与 input 相乘。
说明
支持广播,支持隐式类型转换、类型提升。
警告
Ascend平台, input 和 other 必须为float16或float32。
- 参数:
input (Union[Tensor, numbers.Number, bool]) - 第一个输入tensor。
other (Union[Tensor, numbers.Number, bool]) - 第二个输入tensor。
- 返回:
Tensor
- 支持平台:
Ascend
GPU
CPU
样例:
>>> import mindspore >>> output = mindspore.ops.xlogy(mindspore.tensor([-5., 0., 4.]), mindspore.tensor([2., 2., 2.])) >>> print(output) [-3.465736 0. 2.7725887]