yahoo / open_nsfw

Not Suitable for Work (NSFW) classification using deep neural network Caffe models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ravi-kotadiya opened this issue · 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