diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index efba771f27aa670a99fd310f76d0eb378fc04e4f..a0a2a7937142af0c2a555c58bf46ea5e52a1ae16 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -938,7 +938,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