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

19 lines
414 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.neg
===================
.. py:function:: mindspore.ops.neg(x)
计算输入x的相反数并返回。
.. math::
out_{i} = - x_{i}
参数:
- **x** (Tensor) - Neg的输入Tensor其秩应在[0, 7]范围内,数据类型为数值型。
返回:
Tensorshape和数据类型与输入相同。
异常:
- **TypeError** - `x` 不是Tensor。