Errors importing models from ONNX Model Zoo


I am trying to import some pre-trained ONNX models from here
I have met some issues, and I was wondering if there is something I can do about them apart from writing the models again from scratch (or importing them from frameworks other than ONNX).

  • AlexNet and ZFNet: error when building the models
    File "/.../tvm/topi/include/topi/nn/local_response_norm.h", line 58
    TVMError: Check failed: data->shape.size() == 4 (5 vs. 4) : LRN requires 4-D input

  • GoogleNet: error when building the model
    File "/../tvm/src/arithmetic/const_fold.h", line 198
    TVMError: Check failed: pb->value != 0 (0 vs. 0) : Divide by zero

Any advice? The models work fine if I run them on OnnxRuntime, so I doubt there are intrinsic errors in their structures. These look more like incompatibilities with TVM.


I meet the same problem when i convert inceptionv3 tflite to tvm. Do you solve this problem?


No I didn’t solve it yet. I managed to import a pre-trained model for AlexNet from MXNet and one for GoogleNet from TensorFlow, but this is not the ideal solution for me, since I am evaluating how ONNX models can work. I think it is just a matter of unsupported operators.