diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index a29db04900a0d3e66d064a4a3c760ecf2e67c441..535909d710eb352bfc90ba42cc3b1894491e9ede 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -942,7 +942,7 @@ class Operator(object): self.iop = core.OpBase(type) self.previous_ops = [] - self.attrs = attrs + self.attrs = attrs if attrs else {} else: self.block = block self.desc = desc