2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sqrt_doc.yaml 743 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhanghaibo 提交于 2024-01-18 17:30 . aclnn: Sqrt
sqrt:
description: |
Returns sqrt of a tensor element-wise.
.. math::
out_{i} = \sqrt{x_{i}}
Args:
x (Tensor): The input tensor with a dtype of number.Number.
Returns:
Tensor, has the same shape as the `x`.
Raises:
TypeError: If `x` 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, 4.0, 9.0]), mindspore.float32)
>>> output = ops.sqrt(x)
>>> print(output)
[1. 2. 3.]
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助