Class

MLModelConfiguration

The settings for creating or updating a machine learning model.

Declaration

class MLModelConfiguration : NSObject

Topics

Configuring Model Parameters

var modelParameters: [MLParameterKey : Any]?

The configuration settings your app can override when loading a machine learning model.

Deprecated

Configuring Update Parameters

var updateParameters: [MLParameterKey : Any]?

The configuration settings your app can override before updating a machine learning model.

Deprecated

Configuring GPU Usage

var preferredMetalDevice: MTLDevice?

The metal device you prefer this model use to make predictions (inference) and update the model.

Beta
var allowLowPrecisionAccumulationOnGPU: Bool

A Boolean value that determines whether to allow low-precision accumulation on a GPU.

Beta

Allowing Access to Processing Units

var computeUnits: MLComputeUnits

The processing unit or units the model uses to make predictions.

enum MLComputeUnits

The set of processing-unit configurations the model can use to make predictions.

Supporting Types

class MLParameterKey

A key for model and update parameter dictionaries.

Beta

Relationships

Inherits From

See Also

Creating a Model

init(contentsOf: URL)

Creates a Core ML model object from a compiled model file.

init(contentsOf: URL, configuration: MLModelConfiguration)

Creates a Core ML model object from a compiled model file and a custom configuration.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software