提交 8394699d 编写于 作者: B Bai Yifan 提交者: whs

add stop_gradient in range_api, test=develop (#19484)

上级 e340df01
...@@ -874,6 +874,7 @@ def range(start, end, step, dtype): ...@@ -874,6 +874,7 @@ def range(start, end, step, dtype):
'End': end, 'End': end,
'Step': step}, 'Step': step},
outputs={'Out': [out]}) outputs={'Out': [out]})
out.stop_gradient = True
return out return out
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册