Skip to content

Instantly share code, notes, and snippets.

@josete89
Last active May 25, 2018 10:12
Show Gist options
  • Save josete89/34c036e626c731714897aeab00485b69 to your computer and use it in GitHub Desktop.
Save josete89/34c036e626c731714897aeab00485b69 to your computer and use it in GitHub Desktop.
from coremltools.converters.keras import convert
from keras.models import Sequential
model = Sequential()
...
# In case the model accept a image as input will be more
# easier for iOS code declare in that way.
coreml_model = convert(model, image_input_names="input1")
coreml_model.save('my_model.mlmodel')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment