<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCOptimizer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCOptimizer"
  },
  "title" : "MLCOptimizer"
}
-->

# MLCOptimizer

The base class for all framework optimizers.

```
class MLCOptimizer
```

## Topics

### Inspecting an Optimizer

[`learningRate`](/documentation/MLCompute/MLCOptimizer/learningRate)

The learning rate.

[`gradientRescale`](/documentation/MLCompute/MLCOptimizer/gradientRescale)

The rescale value the optimizer applies to gradients during updates.

[`appliesGradientClipping`](/documentation/MLCompute/MLCOptimizer/appliesGradientClipping)

A Boolean value that indicates whether you apply gradient clipping.

[`gradientClipMax`](/documentation/MLCompute/MLCOptimizer/gradientClipMax)

The maximum gradient value before the optimizer rescales the gradient, if you enable gradient clipping.

[`gradientClipMin`](/documentation/MLCompute/MLCOptimizer/gradientClipMin)

The minimum gradient value before the optimizer rescales the gradient, if you enable gradient clipping.

[`regularizationScale`](/documentation/MLCompute/MLCOptimizer/regularizationScale)

The regularization scale.

[`regularizationType`](/documentation/MLCompute/MLCOptimizer/regularizationType)

The regularization type.

[`gradientClippingType`](/documentation/MLCompute/MLCOptimizer/gradientClippingType)

The type of clipping the system applies to the gradient.

[`MLCGradientClippingType`](/documentation/MLCompute/MLCGradientClippingType)

A clipping type the system applies to a gradient.

[`maximumClippingNorm`](/documentation/MLCompute/MLCOptimizer/maximumClippingNorm)

The maximum clipping value.

[`customGlobalNorm`](/documentation/MLCompute/MLCOptimizer/customGlobalNorm)

A custom norm the system uses in place of the global norm.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)