2022-09-02 16:00:36 +08:00
|
|
|
|
mindspore.ops.sqrt
|
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
|
|
.. py:function:: mindspore.ops.sqrt(x)
|
|
|
|
|
|
|
2022-11-02 19:28:41 +08:00
|
|
|
|
逐元素返回当前Tensor的平方根。
|
2022-09-02 16:00:36 +08:00
|
|
|
|
|
|
|
|
|
|
.. math::
|
2022-11-02 19:28:41 +08:00
|
|
|
|
out_{i} = \\sqrt{x_{i}}
|
2022-09-02 16:00:36 +08:00
|
|
|
|
|
|
|
|
|
|
参数:
|
2022-11-02 19:28:41 +08:00
|
|
|
|
- **x** (Tensor) - 输入Tensor,数据类型为number.Number,其rank需要在[0, 7]范围内.
|
2022-09-02 16:00:36 +08:00
|
|
|
|
|
|
|
|
|
|
返回:
|
|
|
|
|
|
Tensor,具有与 `x` 相同的shape。
|
|
|
|
|
|
|
|
|
|
|
|
异常:
|
2022-11-02 19:28:41 +08:00
|
|
|
|
- **TypeError** - 如果 `x` 不是Tensor。
|
|
|
|
|
|
|