2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
log_doc.yaml 949 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenfei_mindspore 提交于 2024-02-26 16:24 . move doc.yaml to doc dir
log:
description: |
Returns the natural logarithm of a tensor element-wise.
.. math::
y_i = \log_e(x_i)
.. 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.
Args:
input (Tensor): Input Tensor of any dimension. The value must be greater than 0.
Returns:
Tensor, has the same shape and dtype as the `input`.
Raises:
TypeError: If `input` is not a Tensor.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> x = Tensor(np.array([1.0, 2.0, 4.0]), mindspore.float32)
>>> output = ops.log(x)
>>> print(output)
[0. 0.6931472 1.3862944]
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助