mindspore/docs/api/api_python/ops/mindspore.ops.Neg.rst

21 lines
412 B
ReStructuredText
Raw Normal View History

mindspore.ops.Neg
===================
.. py:class:: mindspore.ops.Neg
计算输入x的相反数并返回。
.. math::
out_{i} = - x_{i}
**输入:**
- **x** (Tensor) - Neg的输入任意维度的Tensor秩应小于8。其数据类型为数值型。
**输出:**
Tensorshape和类型与输入相同。
**异常:**
- **TypeError** - `x` 不是Tensor。