image-segmentation-keras
image-segmentation-keras copied to clipboard
How to save a trained model?
Haven't seen any description on the Front Page about how to save a trained model
?
you can use keras model.save_weights
function.
Just want to mention that model.save()
is currently not supported (see #149). I think a good explanation how to save and load a model can be found here on stackoverflow.
I saved the model architecture via model.to_json, but when i tried to reload via model_from_json, i encountered the error "ValueError: Unknown layer: Interp". I supposed this is due to the custom class "Interp" in the model.
Tried to resolve it by model_from_json(json_string, custom_objects={'Interp': Interp}), but a new error "name 'Interp' is not defined" show up.
How can i reload the model so that i can deploy it elsewhere?
any news on this? I'm stucked here. I tried using model.save and load but it isn't working: super good performance when training/evaluating, but then, if I save the model and load it again it makes no sense.
save_weigths will also save your weights and not the architecture, is there a way to save the architecture as well?