mindspore.ops.stop_gradient =========================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/ops/mindspore.ops.func_stop_gradient.rst :alt: 查看源文件 .. py:function:: mindspore.ops.stop_gradient(value) 用于消除某个值对梯度的影响,例如截断来自于函数输出的梯度传播。更多细节请参考 `Stop Gradient `_ 。 参数: - **value** (Any) - 需要被消除梯度影响的值。 返回: 一个与 `value` 相同的值。