<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/MLModelTransformerAdaptor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents25MLModelTransformerAdaptorV"
  },
  "title" : "MLModelTransformerAdaptor"
}
-->

# MLModelTransformerAdaptor

A transformer that uses a Core ML model.

```
struct MLModelTransformerAdaptor<Scalar> where Scalar : MLShapedArrayScalar, Scalar : BinaryFloatingPoint
```

## Topics

### Creating an adaptor

[`init(model: MLModel) throws`](/documentation/CreateMLComponents/MLModelTransformerAdaptor/init(model:))

Creates a model adaptor from an MLModel.

[`init(contentsOf: URL, configuration: MLModelConfiguration) throws`](/documentation/CreateMLComponents/MLModelTransformerAdaptor/init(contentsOf:configuration:))

Creates a model adaptor from a CoreML model URL.

### Getting the model

[`let model: MLModel`](/documentation/CreateMLComponents/MLModelTransformerAdaptor/model)

The CoreML model.

### Performing the transformation

[`func applied(to: MLShapedArray<Scalar>, eventHandler: EventHandler?) async throws -> MLShapedArray<Scalar>`](/documentation/CreateMLComponents/MLModelTransformerAdaptor/applied(to:eventHandler:))

Performs a transformation on a single input.

## Relationships

### Conforms To

[`Transformer`](/documentation/CreateMLComponents/Transformer)

---

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)