This page lists short code examples and full examples of using coremltools to convert models.
For a quick start
Quickstart Example: Demonstrates how to convert an image classifier model trained using the TensorFlow Keras API to the Core ML format.
Model Intermediate Language (MIL)
Model Intermediate Language: Construct a MIL program using the Python builder.
Classifiers: Produce a classifier model
Composite Operators: Defining a composite operation by decomposing it into MIL operations.
Quantization: Reduce the size of the Core ML model produced by conversion.
Trees and Linear Models
Nearest Neighbor Classifier: Create an updatable empty k-nearest neighbor.
If you have a code example you'd like to submit, see Contributing.