Coreml's MLModel with flexible shape runs much slower than fixed shape

207 Views Asked by At

Recently, I find that the mlmodel with flexible shapes runs much slower than the same mlmodel with fixed shapes.
Such as a detect mlmodel, the default input shape is 3 x 416 x 416, it takes 20ms on iphoneXS with ANE(ComputeUnitsALL) with fixed shape.
Then, I changes the mlmodel to 3 X 416... X 416... by coremltools, and I also gives the 3 x 416 x416 image as input, but it takes 60ms on iphoneXS with ANE(ComputeUnitsALL).
I am confused with this problem. Has anyone encountered the same problem? Thanks very much.

0

There are 0 best solutions below