From 3e1e1fee262fd16348fbd1e8f2e6231f791b3eeb Mon Sep 17 00:00:00 2001 From: Huihuang Zheng Date: Wed, 18 Sep 2019 22:22:42 +0800 Subject: [PATCH] Return correct currrent block of a var (#19850) --- python/paddle/fluid/layers/math_op_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/math_op_patch.py b/python/paddle/fluid/layers/math_op_patch.py index 87b5cbeb557..9564eff73f2 100644 --- a/python/paddle/fluid/layers/math_op_patch.py +++ b/python/paddle/fluid/layers/math_op_patch.py @@ -40,7 +40,7 @@ def monkey_patch_variable(): return dtype def current_block(var): - return var.block.program.current_block() + return var.block def create_new_tmp_var(block, dtype): tmp_name = unique_tmp_name() -- GitLab