PLZ let me know if you already fix it. I also had this issue. My email is qsmy122011@gmail.com
Post
Replies
Boosts
Views
Activity
Did you achieve it??
you can use "request.usesCPUOnly = true"
the context code is listed here:
let request = VNCoreMLRequest(model: model!) { request, error in
let results = request.results as! [VNCoreMLFeatureValueObservation]
let featureValue = results.first?.featureValue
let m = featureValue!.multiArrayValue
print(m)
}
// request.imageCropAndScaleOption = .scaleFill
request.usesCPUOnly = true
let handler = VNImageRequestHandler(ciImage: ciImage1)
try? handler.perform([request])
}
Did you fix your problem??? I also have a simlilar problem. I hope I can have an email chat with you.
Have you achieve your goal? I also encountered this problem. Can we communicate via email? Mine is qmsy122011@gmail.com . I am struggling how to convert array MLMultiarray into 2d array or matrix which I can manipulate more easily, like the numpy for matrix in python.