Skip to content

Commit

Permalink
rename block var
Browse files Browse the repository at this point in the history
  • Loading branch information
0x45f committed Dec 19, 2021
1 parent 1d84a4b commit 954b179
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/paddle/fluid/dygraph/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,13 @@ def append_var_from_block_desc_static(block,
if var_desc.persistable():
block = block.program.global_block()

if var_desc.persistable():
current_block = block.program.global_block()
else:
current_block = block

vars_append.append(
block.create_var(
current_block.create_var(
name=var_desc.name(),
dtype=data_type,
type=var_type,
Expand Down

0 comments on commit 954b179

Please sign in to comment.