Thursday, January 11, 2018

How to Save a Keras Model to a JSON file

To save a keras model to a json file, simply use this code:

model_json = model.to_json()
with open("model.json", "w") as json_file:
    json_file.write(model_json)

where model is a keras model object.

No comments:

Post a Comment

Simple Image Classification with Keras

Keras logo There are several kind of image classification: Binary classification Multiclass classification Multi label classificat...