Fix model deserialization
@@ -453,6 +453,8 @@ def model_from_bytes(model, bytes_data):
for layer in queue:
if hasattr(layer, '_mem'):
params = weights[i]
+ layer._mem._get_blob(params.size)
+ layer._mem._i -= params.size
flat_mem = layer._mem._mem.ravel()
flat_params = params.ravel()
flat_mem[:flat_params.size] = flat_params
