2022-06-02 15:21:39 +08:00
|
|
|
|
mindspore.ops.inv
|
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
|
|
.. py:function:: mindspore.ops.inv(x)
|
|
|
|
|
|
|
2022-06-30 16:48:21 +08:00
|
|
|
|
逐元素计算输入Tensor的倒数。
|
2022-06-02 15:21:39 +08:00
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|
|
out_i = \frac{1}{x_{i} }
|
|
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
参数:
|
|
|
|
|
|
- **x** (Tensor) - 任意维度的Tensor。其数据类型为float16、float32或int32。
|
2022-06-02 15:21:39 +08:00
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
返回:
|
|
|
|
|
|
Tensor,shape和类型与输入相同。
|
2022-06-02 15:21:39 +08:00
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
异常:
|
|
|
|
|
|
- **TypeError** - `x` 不是Tensor。
|
|
|
|
|
|
- **TypeError** - `x` 的数据类型不为float16、float32或int32。
|