diff --git a/python/paddle/v2/parameters.py b/python/paddle/v2/parameters.py index d686d09f220671fce50be0784e354f97cb109f32..64805d0c504b876f4d1f6657fe94457534a0b278 100644 --- a/python/paddle/v2/parameters.py +++ b/python/paddle/v2/parameters.py @@ -249,7 +249,7 @@ class Parameters(object): size = reduce(lambda a, b: a * b, param.shape) f.write(struct.pack("IIQ", 0, 4, size)) param = param.astype(np.float32) - f.write(param.tobytes()) + f.write(param.tostring()) def deserialize(self, name, f): """