Commit 15c4a23
authored
Fix UnsqueezeParser for ONNX Opset 13+ (#119)
This PR updates the `Squeeze` and `Unsqueeze` operators to align with the ONNX Opset 13+ standard, where axes is now provided as an input instead of a node attribute. The change is backward compatible, as the old logic remains for single-input cases. A new test case, `CCT/CCT_2_32_32_128_Opset20`, has been added using models exported from PyTorch with ONNX Opset 20 to verify compatibility with recent versions.
## Added
- Added support for ONNX Opset 13 and higher.
## Changed
- UnsqueezeParser in Generic NodeParser
- Check for the presence of `axes` in node attributes and use the old workflow otherwise check for exactly 2 inputs (data and axes).
- Node context was changes accordingly; 1 single input follows the old workflow, 2 inputs uses the new 2 input Op. format.
## Fixed
- Breaking compilation with ONNX Opset 13 and higher when using `Squeeze` Op.1 parent 362033f commit 15c4a23
File tree
7 files changed
+35
-9
lines changed- .github/workflows
- DeeployTest/Tests/CCT/CCT_2_32_32_128_Opset20
- Deeploy/Targets/Generic
7 files changed
+35
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
944 | 950 | | |
945 | | - | |
946 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
947 | 956 | | |
948 | 957 | | |
949 | 958 | | |
| |||
952 | 961 | | |
953 | 962 | | |
954 | 963 | | |
955 | | - | |
956 | 964 | | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
962 | 984 | | |
963 | 985 | | |
964 | 986 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments