mindspore.Tensor.mul

查看源文件
mindspore.Tensor.mul(value)

详情请参考 mindspore.ops.mul()

支持平台:

Ascend GPU CPU

样例:

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> x = Tensor(np.array([1.0, 2.0, 3.0]), mindspore.float32)
>>> y = Tensor(np.array([4.0, 5.0, 6.0]), mindspore.float32)
>>> output = x.mul(y)
>>> print(output)
[ 4. 10. 18.]