Reputation: 9053
I'd like to save all the model parameters (optimizer, learning rate, batch size, etc.) and model architecture (number and types of layers) alongside of the model so that later go back analyze why some models works better.
Is there a simple way to store this metadata along with the weights?
Upvotes: 0
Views: 811
Reputation: 136665
From the docs:
from keras.models import load_model
model.save('my_model.h5') # creates a HDF5 file 'my_model.h5'
del model # deletes the existing model
# returns a compiled model
# identical to the previous one
model = load_model('my_model.h5')
This includes the optimizer (which should include the learning rate and the batch size). Besides that, you can use
If you want one file, just use a container file format like .tar
.
Upvotes: 2