mindspore.mint.log
- mindspore.mint.log(input)[source]
Compute the natural logarithm of the input tensor element-wise.
Warning
If the input value of operator Log is within the range (0, 0.01] or [0.95, 1.05], the output accuracy may be affacted.
- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> x = mindspore.tensor([1.0, 2.0, 4.0], mindspore.float32) >>> output = mindspore.mint.log(x) >>> print(output) [0. 0.6931472 1.3862944]