Fail to convert ONNX to CoreML

Viewed 83

I got onnx model form this notebook: https://colab.research.google.com/drive/1P3cWtg8fnmu9karZHYDAtmm1vj1rgA-f?usp=sharing

It definitely works. Then I tried to convert it to coreml using this code:

mlmodel = coremltools.converters.onnx.convert(
  model = 'pretrained/modnet.onnx',
  predicted_feature_name = [],
  minimum_ios_deployment_target='13',    
)

and I got this error:

index -2 is out of bounds for axis 0 with size 0

Here is the colab notebook to reproduce the issue: https://colab.research.google.com/drive/1v5k7CEXfGbCUIm0f9cC5AZbnRFmZr0yo?usp=sharing

0 Answers
Related