the results of mlmodel using ANE is wrong, but results of gpu and cpu are correct

247 views Asked by At

There is a strange problem about my fcn-mobilenetv2 mlmodel. I convert this mlmodel from onnx using onnx-coreml tool with target=ios12. It can run on ANE because the speed is much faster than CpuAndGpu. However the results of ANE are totally wrong, but the results of cpu-only and CpuAndGpu are correct, no matter the iphone'os is ios12 or ios13.

Then I tried to convert the onnx to mlmodel by setting the target=ios13. It runs successfully on cpu, CpuAndGpu and ANE, and the results are all correct on ios13.

So I am confused that where the bug comes from. The bug may be from the onnx-coreml convert tool or from the coreml sdk in the ios?

xcode 11.3
macos 10.15
iphonexs ios13 and ios 12

0

There are 0 answers