I have the following code, using Keras Scikit-Learn Wrapper:
from keras.models import Sequential
from sklearn import datasets
from keras.layers import Dense
Just adding to gaarv's answer - If you don't require the separation between the model structure (model.to_json()
) and the weights (model.save_weights()
), you can use one of the following:
keras.models.save_model
and 'keras.models.load_model` that store everything together in a hdf5 file.