diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index d413f96e95d1613577f24b4b32a3aa0239b6cc1e..621e46b0f9efe7f5d7d5b079cdb814416814e880 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -1668,7 +1668,7 @@ class Program(object): root_block._remove_op(0, read_op_idx + 1) for var in root_block.all_vars(): if var.type() == core.VarDesc.VarType.READER: - root_block._remove_var(var.name()) + root_block._remove_var(cpt.to_bytes(var.name())) # change all `is_test` attributes to True for i in six.moves.range(res.desc.num_blocks()):