Skip to content

Instantly share code, notes, and snippets.

@vmalyi
Last active November 12, 2017 19:33
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 vmalyi/0c8b9cc7d7dd53331e14c937f2d4bebc to your computer and use it in GitHub Desktop.
Save vmalyi/0c8b9cc7d7dd53331e14c937f2d4bebc to your computer and use it in GitHub Desktop.
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
...
model.fit(X, Y, epochs=NUMBER_OF_EPOCHS, batch_size=BATCH_SIZE)
...
# serialize model to JSON
model_json = model.to_json()
# save JSON to the disk
with open("saved_model.json", "w") as json_file:
json_file.write(model_json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment