yahoo/open_nsfw

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

ravi-kotadiya opened this issue · 1 comments

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 @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