Skip to content

Commit 212c3d9

Browse files
author
channingss
committed
updatea
1 parent be0f062 commit 212c3d9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

x2paddle/decoder/onnx_decoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ def __init__(self, onnx_model):
241241
model.opset_import[0].version)
242242
check_model(model)
243243

244-
# model = convert_version(model, 10)
245244
model = polish_model(model)
246245

247246
model = self.optimize_model_skip_op_for_inference(model)

x2paddle/op_mapper/onnx_op_mapper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ def __init__(self, decoder):
4949
raise Exception("Model are not supported yet.")
5050

5151
#mapping op
52+
53+
print("Total nodes: {}".format(
54+
sum([
55+
isinstance(node, ONNXGraphNode)
56+
for name, node in self.graph.node_map.items()
57+
])))
5258
for node_name in self.graph.topo_sort:
5359
node = self.graph.get_node(node_name)
5460
op = node.layer_type

x2paddle_model_zoo.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
| mNASNet | [code](https://github.com/LiJianfei06/MnasNet-caffe) |
2828
| MTCNN | [code](https://github.com/kpzhang93/MTCNN_face_detection_alignment/tree/master/code/codes/MTCNNv1/model) |
2929

30-
3130
# ONNX
3231

3332
| 模型 | 来源 | operator version|
@@ -44,7 +43,6 @@
4443
| Shufflenet | [onnx official](https://github.com/onnx/models/tree/master/vision/classification/shufflenet) |9|
4544
| Inception_v2 | [onnx official](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/inception_v2) |9|
4645

47-
4846
目前onnx2paddle主要支持onnx operator version 9,关于如何使用torchvison的model:
4947
```
5048
import torch

0 commit comments

Comments
 (0)