Platforms to show: All Mac Windows Linux Cross-Platform

MLModelConfigurationMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreML MBS Mac64bit Plugin 20.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The settings for creating or updating a machine learning model.
Example
// load a Core ML model and only use the CPU, e.g. for reproducible results
Var config As New MLModelConfigurationMBS
config.computeUnits = MLModelConfigurationMBS.ComputeUnitsCPUOnly

Var error As NSErrorMBS
Var model As MLModelMBS = MLModelMBS.modelWithContentsOfFile(SpecialFolder.Desktop.Child("MyModel.mlmodelc"), config, error)
If model = Nil Then
MessageBox error.localizedDescription
Else
MessageBox "Model loaded."
End If

Available in MacOS 10.14 or newer.

Compute Units

Constant Value Description
ComputeUnitsAll 2 The option you choose to allow the model to use all compute units available, including the neural engine.
ComputeUnitsCPUAndGPU 1 The option you choose to allow the model to use both the CPU and GPU, but not the neural engine.
ComputeUnitsCPUOnly 0 The option you choose to limit the model to only use the CPU.

This class has no subclasses.

Blog Entries

Release notes

Some methods using this class:

Some properties using this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS Mac64bit Plugin.


MLMetricKeyMBS   -   MLModelDescriptionMBS


The biggest plugin in space...