Skip to content

Commit

Permalink
Merge pull request #10044 from kuke/fix_fetch_var
Browse files Browse the repository at this point in the history
Fix the bug in executor.fetch_var
  • Loading branch information
Yibing Liu authored Apr 19, 2018
2 parents 6231035 + 129b913 commit 96f316d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 96f316d

Please sign in to comment.