Errors while compiling certain ONNXv7 models with tvm

I have tried compiling classifiers and detectors from the onnx zoo using relay.build but faced errors with models having dynamic input and output shapes. I found out that models with dynamic shapes need to be compiled using relay’s vm compiler.

Using the vm compiler, almost all models from the onnx zoo compiled successfully but certain onnx V7 models(opset 12) gave errors in relay.frontend.from_onnx. eg. The vgg and alexnet models with opset 12 gave error due to the dropout layer, but other versions did not.

On using onnx modifier tool to remove this dropout layer, model compiled successfully. Is there any compatibility issues with onnxv7 models?

The error I encountered was: Check failed: type_code_ == kDLFloat (8 vs. 2) : expected float but got Object. TVMError: In function relay.op.nn._make.dropout(0: RelayExpr, 1: double) → RelayExpr: error while converting argument 1: [09:36:14] /workspace/tvm/include/tvm/runtime/packed_func.h:550:

1 Like

@jwfromm, @tqchen, @thierry @junrushao