Skip to content

Instantly share code, notes, and snippets.

@romanbsd
Created June 27, 2018 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romanbsd/67d9cd1b00c51a7138420b041b0cb1a3 to your computer and use it in GitHub Desktop.
Save romanbsd/67d9cd1b00c51a7138420b041b0cb1a3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
from keras.models import model_from_json
model = model_from_json(open(sys.argv[1]).read())
print('Loaded model')
model.load_weights(sys.argv[2])
print('Loaded weights')
model.save(sys.argv[3])
print('Saved model')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment