提交 f7d0d99f 编写于 作者: L liaogang

'numpy.ndarray' object has no attribute 'tobytes'

上级 ba3d9f02
......@@ -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):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册