提交 1dfddae2 编写于 作者: G gangliao 提交者: GitHub

Merge pull request #2037 from gangliao/v2_bug

'numpy.ndarray' object has no attribute 'tobytes'
......@@ -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.
先完成此消息的编辑!
想要评论请 注册