Closed Factos001 closed 4 years ago
@leolx7 Thanks for reporting the issue --- it seems the ONNX file does not list operators in a topological ordering and TASO failed to recover the order. Can you point me the ONNX file version you used (realise 1.x or master)? I want to debug this using the same version.
@jiazhihao Actually I have tried all these five versions and all of them got the same error.
Thanks for letting me know. I will debug this issue and get back to you.
@leolx7 The issue should have been fixed in commit e6fc34398
@jiazhihao Thanks for the feedback. I have tried. The error has gone. But it seems that the program skips a lot of operators. Like "Cannot find input tensor for operator: name(Relu_15) type (Relu) (Skipped)". As a result, the output optimized graph has much layers less than the original graph. For example, the output optimized graph for ResNet50 has only 6 layers.
@leolx7 That is because TASO cannot find the input tensors from the ONNX model. I have tried https://s3.amazonaws.com/download.onnx/models/opset_6/resnet50.tar.gz and it seems to work for me. Which ONNX version are you using?
Hi, I am using the master one. I have tried the version you used. The optimized result is basically the same, like the image shown below.
@leolx7 I can reproduce your error on my machine. It is because the master version of ResNet50 uses Sum instead of Add for element-wise addition. I have added the support for Sum in TASO (commit fed32e9cf). The optimized graph looks good on my machine.
It would be great if you can rerun TASO can confirm the fix.
@jiazhihao Hi, I use the master version of ResNet50 and rerun TASO. It works well and the optimized graph looks good. Thanks for your patience.
Hi, I first download the .onnx model from this repo: https://github.com/onnx/models/tree/master/vision/classification/resnet/resnet50
Then I use the code below to load the model old_model = taso.load_onnx("./resnet50.onnx")
An error message appears that File "/home/ubuntu/taso/python/taso/init.py", line 730, in load_onnx assert len(node_list) == len(mode.graph.node), "Internal error when reording ONNX operators"
I am wondering how to solve this problem, thanks!