jiazhihao / TASO

The Tensor Algebra SuperOptimizer for Deep Learning
Apache License 2.0
682 stars 89 forks source link

Internal error when reording ONNX operators #76

Open leiwen83 opened 3 years ago

leiwen83 commented 3 years ago

Hi,

I try to take some test over some onnx model, but meet the error as "internal error when reording onnx operators"

Traceback (most recent call last): File "convert.py", line 4, in old_model = taso.load_onnx("part4_wo_stack.onnx") File "/opt/conda/lib/python3.7/site-packages/taso-0.1.0-py3.7-linux-x86_64.egg/taso/init.py", line 728, in load_onnx assert len(node_list) == len(model.graph.node), "Internal error when reording ONNX operators" AssertionError: Internal error when reording ONNX operators

The method I use is like the README.md says, and the environment I use is prebuit tasoml/cuda100 docker:

import taso
import onnx

old_model = taso.load_onnx("/path/to/load/onnx/model")
taso_graph = taso.optimize(old_model)
new_model = taso.export_onnx(taso_graph)
onnx.save(new_model, "/path/to/save/new/onnx/model")

Is there some clue for how to debug this?

Thx, Lei

Sagebati commented 3 years ago

Hi @leiwen83, did you find any solution ? I have this issue as well With https://github.com/onnx/models/blob/master/vision/classification/alexnet/model/bvlcalexnet-9.onnx using the docker environment too.