dump weights of cnn in json using keras

Viewed 5020

I want to use the dumped weights and model architecture in other framework for testing.

I know that:

  • model.get_config() can give the configuration of the model
  • model.to_json returns a representation of the model as a JSON string, but that the representation does not include the weights, only the architecture
  • model.save_weights(filepath) saves the weights of the model as a HDF5 file

I want to save the architecture as well as weights in a json file.

1 Answers
Related