Skip to content

Commit

Permalink
chore: fix export script
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker1212 committed Oct 19, 2024
1 parent e2a7694 commit 590760a
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions tools/onnx_transform.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@
"| OUT: multiclass_nms3_0.tmp_2 | int32: ('p2o.DynamicDimension.3',) | int32: (1,) |\n",
"+------------------------------+----------------------------------------+---------------------------------+\n",
"| Add | 30 | 30 |\n",
"| BatchNormalization | 89 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| BatchNormalization | 89 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Cast | 2 | 2 |\n",
"| Concat | 20 | 20 |\n",
"| Constant | 735 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Constant | 735 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Conv | 152 | 152 |\n",
"| Div | 1 | 1 |\n",
"| Gather | 7 | 7 |\n",
"| GlobalAveragePool | 3 | 3 |\n",
"| HardSigmoid | 4 | 4 |\n",
"| MaxPool | 3 | 3 |\n",
"| Mul | 279 | \u001B[32m146\u001B[37m\u001B[0m |\n",
"| Mul | 279 | \u001b[32m146\u001b[37m\u001b[0m |\n",
"| NonMaxSuppression | 1 | 1 |\n",
"| ReduceMean | 4 | 4 |\n",
"| ReduceMin | 1 | 1 |\n",
"| Reshape | 12 | \u001B[32m11\u001B[37m\u001B[0m |\n",
"| Reshape | 12 | \u001b[32m11\u001b[37m\u001b[0m |\n",
"| Resize | 2 | 2 |\n",
"| Shape | 2 | 2 |\n",
"| Sigmoid | 142 | 142 |\n",
Expand Down Expand Up @@ -130,9 +130,9 @@
"+-------------------------+----------------------------------------+----------------------------------------+\n",
"| Add | 24 | 24 |\n",
"| AveragePool | 3 | 3 |\n",
"| BatchNormalization | 59 | \u001B[32m2\u001B[37m\u001B[0m |\n",
"| BatchNormalization | 59 | \u001b[32m2\u001b[37m\u001b[0m |\n",
"| Concat | 1 | 1 |\n",
"| Constant | 323 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Constant | 323 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Conv | 65 | 65 |\n",
"| ConvTranspose | 4 | 4 |\n",
"| Exp | 1 | 1 |\n",
Expand Down Expand Up @@ -174,9 +174,9 @@
"| OUT: linear_1.tmp_1 | float32: ('p2o.DynamicDimension.1', 4) | float32: ('p2o.DynamicDimension.0', 4) |\n",
"+---------------------+----------------------------------------+----------------------------------------+\n",
"| Add | 1 | 1 |\n",
"| BatchNormalization | 27 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Concat | 1 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Constant | 151 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| BatchNormalization | 27 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Concat | 1 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Constant | 151 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Conv | 32 | 32 |\n",
"| GlobalAveragePool | 3 | 3 |\n",
"| HardSigmoid | 2 | 2 |\n",
Expand All @@ -185,8 +185,8 @@
"| Mul | 3 | 3 |\n",
"| Relu | 2 | 2 |\n",
"| Reshape | 1 | 1 |\n",
"| Shape | 1 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Slice | 1 | \u001B[32m0\u001B[37m\u001B[0m |\n",
"| Shape | 1 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"| Slice | 1 | \u001b[32m0\u001b[37m\u001b[0m |\n",
"+---------------------+----------------------------------------+----------------------------------------+\n",
"| Model Size | 6.46 MB | 6.39 MB |\n",
"+---------------------+----------------------------------------+----------------------------------------+\n",
Expand Down Expand Up @@ -289,19 +289,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Invalid model: Nodes in a graph must be topologically sorted, however input 'p2o.Gather.9_squeezed' of node: \n",
"name: p2o.Cast.0 OpType: Cast\n",
" is not output of any previous nodes.\n"
]
}
],
"outputs": [],
"source": [
"from fix_onnx import fix_onnx\n",
"import os\n",
Expand Down

0 comments on commit 590760a

Please sign in to comment.