Contents

MLModel

An encapsulation of all the details of your machine learning model.

Declaration

class MLModel

Mentioned in

Overview

MLModel encapsulates a model’s prediction methods, configuration, and model description.

In most cases, you can use Core ML without accessing the MLModel class directly. Instead, use the programmer-friendly wrapper class that Xcode automatically generates when you add a model (see Integrating a Core ML Model into Your App). If your app needs the MLModel interface, use the wrapper class’s model property.

With the MLModel interface, you can:

If your app downloads and compiles a model on the user’s device, you must use the MLModel class directly to make predictions. See Downloading and Compiling a Model on the User’s Device.

Topics

Loading a model

Compiling a model

Making predictions

Making state

Inspecting a model

Supporting types

See Also

Core ML models