An encapsulation of all the details of your machine learning model.
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+Beta
- tvOS 11.0+
- watchOS 4.0+
- Core ML
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 Add a Model to Your Xcode Project). Use the
model property from the wrapper class if your app needs the
MLModel interface in addition to the wrapper class.
MLModel interface to:
If your app downloads and compiles a model on the user's device, the
MLModel interface is the only way for your app to use that model. See Downloading and Compiling a Model on the User's Device.