mindspore.ops.Log

class mindspore.ops.Log[source]

Returns the natural logarithm of a tensor element-wise.

Refer to mindspore.ops.log() for more details.

Supported Platforms:

Ascend GPU CPU

Examples

>>> x = Tensor(np.array([1.0, 2.0, 4.0]), mindspore.float32)
>>> log = ops.Log()
>>> output = log(x)
>>> print(output)
[0.        0.6931472 1.3862944]