MLParameterKey
The keys for the parameter dictionary in a model configuration or a model update context.
Declaration
class MLParameterKeyOverview
Use an MLParameterKey to retrieve a model’s parameter value using:
The model’s parameterValue(for:) method
The parameters dictionary of an MLModelConfiguration
The parameters dictionary of an MLUpdateContext
Overriding model and layer parameters
To override a model’s default parameter values:
Create an MLModelConfiguration instance.
Use an MLParameterKey for each parameter to set its value in the model configuration’s parameters dictionary.
Create a new model instance using init(contentsOf:configuration:) with your custom model configuration.
Configuring update parameters
To configure the update parameters for an MLUpdateTask:
Create an MLModelConfiguration instance.
Use an MLParameterKey for each parameter to set its value in the model configuration’s parameters dictionary.
Create a new update task with your custom model configuration.