Instance Method

predictions(from:)

Generates predictions for given the given array of images.

Declaration

func predictions(from images: [URL]) throws -> [String]

Parameters

images

An array of images you want the model to classify.

Return Value

An array of labels that the model predicts for the given images. Each label has the same index as the image to which it corresponds.

See Also

Testing an Image Classifier

func prediction(from: CGImage) -> String

Generates a prediction for given image.

func prediction(from: URL) -> String

Generates a prediction for the image at the given URL.