Predicting Generalization in Deep Learning Forum

Go back to competition Back to thread list Post in this thread

> Way to save a custom model for the competition

Hi,
Can anyone suggest a way to save the custom model configuration for the competition as json file. I get error corresponding to wraplayer i try to save the custom model.
Regards

Posted by: Vashisht @ Aug. 18, 2020, 7:53 a.m.

Could you elaborate what exactly you want to do? If it helps, you can send us an email.

Posted by: ydjiang @ Aug. 19, 2020, 11:34 p.m.

Hi,
So as mentioned in the shared colab notebook i have trained a model for a custom dataset say cifar10. Now I just want to save the model weights and model configuration for this. I have been able to save the weights but for configuration to be saved as json file i get error corresponding to wrap layer.
Please suggest a solution

Posted by: Vashisht @ Aug. 21, 2020, 5:04 p.m.

Hi

There is no simple way to save a model as a json file so that it can be loaded with the utility function we provide. The json files are written directly and then converted to sequential models. You can write the json file yourself if you would like, it is quite easy (just a list of dictionaries with the layer name and arguments for each layer). Alternatively, you can use the standard keras model serialization, but then you will not be able to load it with the function we provide.

One of these two solutions should be good for your usecase, I can help you with that if you can provide a bit more details into what you want to accomplish.

Good luck!

Posted by: pforet @ Aug. 21, 2020, 7:16 p.m.
Post in this thread