Skip to content

Instantly share code, notes, and snippets.

@codePrincess
Created March 27, 2018 13:04
Show Gist options
  • Save codePrincess/d4faa25fb74990d2d7cdc22ee17b9ce1 to your computer and use it in GitHub Desktop.
Save codePrincess/d4faa25fb74990d2d7cdc22ee17b9ce1 to your computer and use it in GitHub Desktop.
from coremltools.converters import sklearn as sklearn_to_ml
from sklearn.externals import joblib
model = joblib.load('mymodel.pkl')
print('Converting model')
coreml_model = sklearn_to_ml.convert(model)
print('Saving CoreML model')
coreml_model.save('mycoremlmodel.mlmodel')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment