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

ut_timeout_modifed
liym27 4 years ago committed by GitHub
parent 252aeb1a46
commit 3497fbe473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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__

Loading…
Cancel
Save