You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have an onnx model on which I want to run the onnx-optimize.py script. All the optimizers work fine except the TransposeOptimizer. When I use it, my onnx model is not working anymore, with onnxruntime at least. I get this error :
[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Split node. Name:'Split_12' Status Message: D:\a\_work\1\s\onnxruntime\core\providers\cpu\tensor\split.cc:160 onnxruntime::Split::ComputeImpl split_tensor->Shape().NumDimensions() == 1 was false. An split tensor must be a vector tensor.
Urgency
None, for now I deactivated this optimizer and I'm using all the others.
@CarlPoirier The latest tf2onnx verison 1.12 has been released. I think your model can be optimized as expected. Thanks!
hwangdeyu
changed the title
Using TransposeOptimizer breaks model (again)
Using TransposeOptimizer breaks model with split optimizer opset >= 13 error
Aug 12, 2022
Describe the bug
I have an onnx model on which I want to run the onnx-optimize.py script. All the optimizers work fine except the TransposeOptimizer. When I use it, my onnx model is not working anymore, with onnxruntime at least. I get this error :
[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Split node. Name:'Split_12' Status Message: D:\a\_work\1\s\onnxruntime\core\providers\cpu\tensor\split.cc:160 onnxruntime::Split::ComputeImpl split_tensor->Shape().NumDimensions() == 1 was false. An split tensor must be a vector tensor.
Urgency
None, for now I deactivated this optimizer and I'm using all the others.
System information
To Reproduce
test_models.zip
The above zip contains four files:
I'm running the onnx-optimize script this way:
python onnx-optimize-orig.py --input test_model2_small.onnx --output test_model2_small_broken.onnx 2022-05-17 19:13:24.283642: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll 2022-05-17 19:13:27,704 - INFO - Optimizing ONNX model 2022-05-17 19:13:27,732 - INFO - After optimization: Const -1 (7->6), Identity -1 (1->0)
Then I run the model with any image, this way:
python test-run.py
If you need any more information, let me know!
The text was updated successfully, but these errors were encountered: