2021-12-07 12:17:56 +08:00
|
|
|
|
mindspore.ops.Inv
|
|
|
|
|
|
=================
|
|
|
|
|
|
|
2021-12-21 18:09:08 +08:00
|
|
|
|
.. py:class:: mindspore.ops.Inv()
|
2021-12-07 12:17:56 +08:00
|
|
|
|
|
|
|
|
|
|
按元素计算输入Tensor的倒数。
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|
|
out_i = \frac{1}{x_{i} }
|
|
|
|
|
|
|
|
|
|
|
|
**输入:**
|
|
|
|
|
|
|
2021-12-21 18:09:08 +08:00
|
|
|
|
**x** (Tensor) - 任意维度的Tensor。数据类型必须是float16、float32或int32。
|
2021-12-07 12:17:56 +08:00
|
|
|
|
|
|
|
|
|
|
**输出:**
|
|
|
|
|
|
|
|
|
|
|
|
Tensor,shape和数据类型与 `x` 相同。
|
|
|
|
|
|
|
|
|
|
|
|
**异常:**
|
|
|
|
|
|
|
2022-02-07 10:15:37 +08:00
|
|
|
|
- **TypeError** - `x` 不是Tensor。
|
2021-12-21 18:09:08 +08:00
|
|
|
|
- **TypeError** - `x` 的数据类型不是float16、float32或int32。
|