Skip to content
This repository has been archived by the owner on Oct 18, 2019. It is now read-only.

caffemodel converted to iOS CoreML(.mlmodel) Model it's returning result in Multiarray #59

Open
ravi-kotadiya opened this issue Sep 2, 2017 · 1 comment

Comments

@ravi-kotadiya
Copy link

ravi-kotadiya commented Sep 2, 2017

Recently I converted your caffemodel to CoreMode(.mlmodel) but whenever I put in Xcode it's automatically detect mlmodel file and it's giving me Multiarray result.

@ravi-kotadiya ravi-kotadiya changed the title caffemodel converted for iOS CoreML(.mlmodel) Model returning result in Multiarray caffemodel converted to iOS CoreML(.mlmodel) Model it's returning result in Multiarray Sep 2, 2017
@ravi-kotadiya ravi-kotadiya reopened this Sep 3, 2017
@chika-kasymov
Copy link

@ravi-kotadiya @ycchen1 I think you can access the first element from that array and that is the result (double value).

Example:

let prediction = ...  // your model prediction
let prob = prediction.prob  // the MLMultiArray result, in your case may be other name
let precision = prob![0].doubleValue  // the result like 0.7512

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants