I am using a .playground file and I can't seem to add my CoreML
model to it. I drag it into the Resources folder and this is my code:
func predict(image: CGImage) {
let model = try! VNCoreMLModel(for: Inceptionv3().model)
let request = VNCoreMLRequest(model: model, completionHandler: results)
let handler = VNSequenceRequestHandler()
try! handler.perform([request], on: image)
}
However, I get the error saying:
Use of Undeclared Type Inceptionv3
Can someone please help me out?
See Question&Answers more detail:os