mindspore.ops.inplace_sub ========================= .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/ops/mindspore.ops.func_inplace_sub.rst :alt: 查看源文件 .. py:function:: mindspore.ops.inplace_sub(x, v, indices) 根据索引将 `x` 减 `v` 。 对于 `indices` 的每个元素下标 :math:`i, ..., j` : .. math:: x[\text{index}[i, ..., j]] \mathrel{-}= v[i, ..., j] 参数: - **x** (Tensor) - 输入tensor。 - **v** (Tensor) - 被 `x` 减去的tensor。 - **indices** (Union[int, tuple]) - 对输入 `x` 沿第0维度的索引。 返回: Tensor