Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your model ir_version is higher than the checker's. #160

Open
ccshi opened this issue Sep 3, 2019 · 3 comments
Open

Your model ir_version is higher than the checker's. #160

ccshi opened this issue Sep 3, 2019 · 3 comments

Comments

@ccshi
Copy link

ccshi commented Sep 3, 2019

I meet the following questin when i exacute :
"onnc/bin/onnc torchalex/alexnet.onnx -mquadruple nvdla"

Your model ir_version is higher than the checker's.
ONNXShapeInference pass is not workable!!
Your model ir_version is higher than the checker's.
ONNXShapeInference pass is not workable!!
createTensor error: unknow elemtype = 0
Segmentation fault (core dumped)

@a127a127
Copy link
Contributor

Currently, we use ONNX v1.3, it's ir_version is 3. And your model comes from a higher version ONNX.
You can upgrade the ONNX that ONNC used. It may require some modification.

@robinvanemden
Copy link

robinvanemden commented May 29, 2020

It is a bit of a hack, but if the ops used by your model were available in ONNX v1.3 / ir_version 3, you may be able get your model running by lowering its ir_version.

For instance, using the Python onnx package:

import onnx
from onnx import version_converter

target_version = 8
ir_version     = 3

model_path     = './model.onnx'
original_model = onnx.load(model_path)

converted_model = version_converter.convert_version(original_model , target_version)
converted_model.ir_version = ir_version

onnx.save(converted_model, model_path)

@padmasreenagarajan
Copy link

padmasreenagarajan commented Sep 4, 2020

Hi @robinvanemden ...im getting this error if i use the code u mentioned

IndexError: invalid unordered_map<K, T> key in the line
converted_model = version_converter.convert_version(original_model , target_version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants