未验证 提交 96f316dc 编写于 作者: Y Yibing Liu 提交者: GitHub

Merge pull request #10044 from kuke/fix_fetch_var

Fix the bug in executor.fetch_var
...@@ -151,7 +151,7 @@ def fetch_var(name, scope=None, return_numpy=True): ...@@ -151,7 +151,7 @@ def fetch_var(name, scope=None, return_numpy=True):
scope = global_scope() scope = global_scope()
assert isinstance(scope, core.Scope) assert isinstance(scope, core.Scope)
var = global_scope().find_var(name) var = scope.find_var(name)
assert var is not None, ( assert var is not None, (
"Cannot find " + name + " in scope. Perhaps you need to make the" "Cannot find " + name + " in scope. Perhaps you need to make the"
" variable persistable by using var.persistable = True in your" " variable persistable by using var.persistable = True in your"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册