Fix current block in math_patch_op (#21189)

paddle_tiny_install
Huihuang Zheng 5 years ago committed by GitHub
parent 5af0c7ba89
commit 99331fa113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,8 +42,7 @@ def monkey_patch_variable():
def current_block(var):
if in_dygraph_mode():
return default_main_program().global_block()
else:
return var.block
return var.block.program.current_block()
def create_new_tmp_var(block, dtype):
tmp_name = unique_tmp_name()

Loading…
Cancel
Save