未验证 提交 2d0c6948 编写于 作者: H HongyuJia 提交者: GitHub

[CustomOp Unittest] Fix XPU unittest, discard static backward (#53899)

上级 1ac28b6b
......@@ -46,9 +46,7 @@ def custom_relu_static(
with static.scope_guard(static.Scope()):
with static.program_guard(static.Program()):
x = static.data(name='X', shape=[None, 8], dtype=dtype)
x.stop_gradient = False
out = func(x) if use_func else paddle.nn.functional.relu(x)
static.append_backward(out)
exe = static.Executor()
exe.run(static.default_startup_program())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册