2022-06-02 15:21:39 +08:00
|
|
|
|
mindspore.ops.invert
|
|
|
|
|
|
====================
|
|
|
|
|
|
|
|
|
|
|
|
.. py:function:: mindspore.ops.invert(x)
|
|
|
|
|
|
|
2022-06-30 16:48:21 +08:00
|
|
|
|
对输入逐元素按位翻转。
|
2022-06-02 15:21:39 +08:00
|
|
|
|
|
|
|
|
|
|
.. math::
|
2022-06-30 17:11:17 +08:00
|
|
|
|
out_i = \sim x_{i}
|
2022-06-02 15:21:39 +08:00
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
参数:
|
|
|
|
|
|
- **x** (Tensor) - `x` 的shape为 :math:`(x_1, x_2, ..., x_R)`。其数据类型为int16或uint16。
|
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` 的数据类型不为int16或uint16。
|