---
title: MLParameterKey
framework: coreml
role: symbol
role_heading: Class
path: coreml/mlparameterkey
---

# MLParameterKey

The keys for the parameter dictionary in a model configuration or a model update context.

## Declaration

```swift
class MLParameterKey
```

## Overview

Overview 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 note: To access the parameter of a specific model within a pipeline model, use the parameter key’s scoped(to:) method with the model’s name. 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. See Personalizing a Model with On-Device Updates.

## Topics

### Scoping parameter keys

- [scoped(to:)](coreml/mlparameterkey/scoped(to:).md)

### Accessing model parameters

- [numberOfNeighbors](coreml/mlparameterkey/numberofneighbors.md)
- [linkedModelFileName](coreml/mlparameterkey/linkedmodelfilename.md)
- [linkedModelSearchPath](coreml/mlparameterkey/linkedmodelsearchpath.md)

### Accessing neural network layer parameters

- [weights](coreml/mlparameterkey/weights.md)
- [biases](coreml/mlparameterkey/biases.md)

### Accessing model update parameters

- [learningRate](coreml/mlparameterkey/learningrate.md)
- [momentum](coreml/mlparameterkey/momentum.md)
- [miniBatchSize](coreml/mlparameterkey/minibatchsize.md)
- [beta1](coreml/mlparameterkey/beta1.md)
- [beta2](coreml/mlparameterkey/beta2.md)
- [eps](coreml/mlparameterkey/eps.md)
- [epochs](coreml/mlparameterkey/epochs.md)
- [shuffle](coreml/mlparameterkey/shuffle.md)
- [seed](coreml/mlparameterkey/seed.md)

## Relationships

### Inherits From

- [MLKey](coreml/mlkey.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Inspecting a model

- [availableComputeDevices](coreml/mlmodel/availablecomputedevices-6klyt.md)
- [configuration](coreml/mlmodel/configuration.md)
- [modelDescription](coreml/mlmodel/modeldescription.md)
- [MLModelDescription](coreml/mlmodeldescription.md)
- [parameterValue(for:)](coreml/mlmodel/parametervalue(for:).md)
