diff --git a/x2paddle/core/fluid_code.py b/x2paddle/core/fluid_code.py index a539750d5b8a1b96963f0bec289810335377d563..6f4df3fc89d25fea6fe9aeb9c46c77f7b30f4e68 100644 --- a/x2paddle/core/fluid_code.py +++ b/x2paddle/core/fluid_code.py @@ -88,6 +88,8 @@ class Layer(object): for key, value in param_attr.items(): if '\n' in str(value): value = string(str(value).replace('\n', ',')) + if str(key) == 'attr': + value = 'ParamAttr(' + str(value) + ')' layer_code = layer_code + key + "={}, ".format(value) layer_code = layer_code.strip(", ")