Open zazula opened 3 years ago
Note : loading from JSON seems to work across architectures.
Same here. Thank you for posting this workaround!
You will have to manually save/load weights when using the JSON representation:
model.save_weights('my.file')
You might be able to fish them out of the HDF5 file from model.save('mymodel.hdf5'), I see keys for the weights, but I haven't tried this.
When I load a model created on an M1 mac with savemodel() using load mode() on a non-M1 machine, I get the following error:
Op type not registered 'MLCDropout' in binary running on XXX. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.)
tf.contrib.resampler
should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.Is there support or planned support for a "universal" model format?
I see in the JSON format that the names are the base class name (e.g., 'Dropout'). I'll see if that works for a cross-platform format.
Maybe that error message could do a check against the library and be more specific? e.g.,
MLCDropout is not available for the current architecture... or somesuch...