diff --git a/python/paddle/fluid/layers/math_op_patch.py b/python/paddle/fluid/layers/math_op_patch.py index 87b5cbeb557f9470e4b1ef129555e8c6e5e7cefb..9564eff73f2af24bbb2d6492f73eaa3fb2102356 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()