The source of a custom feature extractor, stored in an .mlmodel file, used to train an image classifier.


struct MLImageClassifier.CustomFeatureExtractor


Creating a Custom Feature Extractor

init(modelPath: URL, outputName: String?)

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

Configuring a Custom Feature Extractor

var modelPath: URL

The location of a neural network .mlmodel file that takes an image as an input.

var outputName: String?

The name of the output from a feature extraction layer within the model.

See Also

Selecting a Feature Extractor Type

case scenePrint(revision: Int?)

A feature extractor trained on millions of images, that’s included in Create ML.

case custom(MLImageClassifier.CustomFeatureExtractor)

Your own feature extractor which you provide with an .mlmodel file or a layer within that file.