Merge pull request #2037 from gangliao/v2_bug

'numpy.ndarray' object has no attribute 'tobytes'
feature/design_of_v2_layer_converter
gangliao 8 years ago committed by GitHub
commit 1dfddae20b

@ -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):
"""

Loading…
Cancel
Save