diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index bb271a961c8dc2b46e5923491bad8b885bd8d8cf..2671dd10769afa3d758e22e40bfd324610f3c494 100644 --- a/x2paddle/decoder/onnx_decoder.py +++ b/x2paddle/decoder/onnx_decoder.py @@ -241,7 +241,6 @@ class ONNXDecoder(object): model.opset_import[0].version) check_model(model) - # model = convert_version(model, 10) model = polish_model(model) model = self.optimize_model_skip_op_for_inference(model) diff --git a/x2paddle/op_mapper/onnx_op_mapper.py b/x2paddle/op_mapper/onnx_op_mapper.py index 0fb57ef313ab122a086ce77d8963129e155ab859..2fc4ff15c3dee0e87c48de53a4f1f2529494d360 100644 --- a/x2paddle/op_mapper/onnx_op_mapper.py +++ b/x2paddle/op_mapper/onnx_op_mapper.py @@ -49,6 +49,12 @@ class ONNXOpMapper(OpMapper): raise Exception("Model are not supported yet.") #mapping op + + print("Total nodes: {}".format( + sum([ + isinstance(node, ONNXGraphNode) + for name, node in self.graph.node_map.items() + ]))) for node_name in self.graph.topo_sort: node = self.graph.get_node(node_name) op = node.layer_type diff --git a/x2paddle_model_zoo.md b/x2paddle_model_zoo.md index c0f30b25bf3d96b219d84e368cdc99c05043ab15..80d12d9fdc91ead399bc6c9da26d8be5929becfd 100644 --- a/x2paddle_model_zoo.md +++ b/x2paddle_model_zoo.md @@ -27,7 +27,6 @@ | mNASNet | [code](https://github.com/LiJianfei06/MnasNet-caffe) | | MTCNN | [code](https://github.com/kpzhang93/MTCNN_face_detection_alignment/tree/master/code/codes/MTCNNv1/model) | - # ONNX | 模型 | 来源 | operator version| @@ -44,7 +43,6 @@ | Shufflenet | [onnx official](https://github.com/onnx/models/tree/master/vision/classification/shufflenet) |9| | Inception_v2 | [onnx official](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/inception_v2) |9| - 目前onnx2paddle主要支持onnx operator version 9,关于如何使用torchvison的model: ``` import torch