Merge pull request #10044 from kuke/fix_fetch_var

Fix the bug in executor.fetch_var
wangkuiyi-patch-2
Yibing Liu 7 years ago committed by GitHub
commit 96f316dcc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,7 +151,7 @@ def fetch_var(name, scope=None, return_numpy=True):
scope = global_scope()
assert isinstance(scope, core.Scope)
var = global_scope().find_var(name)
var = scope.find_var(name)
assert var is not None, (
"Cannot find " + name + " in scope. Perhaps you need to make the"
" variable persistable by using var.persistable = True in your"

Loading…
Cancel
Save