未验证 提交 3497fbe4 编写于 作者: L liym27 提交者: GitHub

Use paddle.disable_static() to replace with dygraph.guard(). (#27139)

上级 252aeb1a
......@@ -217,7 +217,7 @@ def _dygraph_not_support_(func):
def _dygraph_only_(func):
def __impl__(*args, **kwargs):
assert in_dygraph_mode(
), "We Only support %s in imperative mode, please use fluid.dygraph.guard() as context to run it in imperative Mode" % func.__name__
), "We Only support %s in dynamic mode, please call 'paddle.disable_static()' to enter dynamic mode." % func.__name__
return func(*args, **kwargs)
return __impl__
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册