From 41452582962a7ad57945c8d5b21fb9ebd95752b4 Mon Sep 17 00:00:00 2001 From: Yancey1989 Date: Thu, 3 May 2018 17:03:24 +0800 Subject: [PATCH] fix delete_ops --- python/paddle/fluid/framework.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 2cdf010926..c9a48ea838 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -854,11 +854,10 @@ class Block(object): try: start = list(self.ops).index(ops[0]) end = list(self.ops).index(ops[-1]) + [self.remove_op(start) for _ in xrange(end - start + 1)] except Exception, e: raise e - self.desc.remove_op(start, end + 1) - def slice_ops(self, start, end): return self.ops[start:end] -- GitLab