<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLImageClassifier/CustomFeatureExtractor/init(modelPath:outputName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML17MLImageClassifierV22CustomFeatureExtractorV9modelPath10outputNameAE10Foundation3URLV_SSSgtcfc"
  },
  "title" : "init(modelPath:outputName:)"
}
-->

# init(modelPath:outputName:)

Creates a custom feature extractor given a model file and an optional output layer name.

```
init(modelPath: URL, outputName: String? = nil)
```

## Parameters

`modelPath`

The location of the neural network `.mlmodel` which contains the feature extractor.

`outputName`

The name of a feature extraction layer within the model has one output type of
<doc://com.apple.documentation/documentation/CoreML/MLMultiArray>. Set this value to `nil` if the
model, as a whole, accepts an input image and has exactly one output of type
<doc://com.apple.documentation/documentation/CoreML/MLMultiArray>.

---

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)