From 66f82a4770992752afaccd0e439a678bc484a7e7 Mon Sep 17 00:00:00 2001 From: Channingss Date: Fri, 14 Aug 2020 18:15:36 +0800 Subject: [PATCH] fix bug of nearest opset11 --- x2paddle/op_mapper/paddle2onnx/opset11/opset.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/x2paddle/op_mapper/paddle2onnx/opset11/opset.py b/x2paddle/op_mapper/paddle2onnx/opset11/opset.py index 6cbfb18..dee81ee 100644 --- a/x2paddle/op_mapper/paddle2onnx/opset11/opset.py +++ b/x2paddle/op_mapper/paddle2onnx/opset11/opset.py @@ -29,7 +29,6 @@ class OpSet11(OpSet10): super(OpSet11, self).__init__() def relu6(self, op, block): - print('relu6') min_name = self.get_name(op.type, 'min') max_name = self.get_name(op.type, 'max') min_node = self.make_constant_node(min_name, onnx_pb.TensorProto.FLOAT, @@ -43,7 +42,6 @@ class OpSet11(OpSet10): return [min_node, max_node, node] def pad2d(self, op, block): - print('pad2d') x_shape = block.var(op.input('X')[0]).shape paddings = op.attr('paddings') onnx_pads = [] @@ -71,7 +69,6 @@ class OpSet11(OpSet10): return [pads_node, constant_value_node, node] def clip(self, op, block): - print('clip') min_name = self.get_name(op.type, 'min') max_name = self.get_name(op.type, 'max') min_node = self.make_constant_node(min_name, onnx_pb.TensorProto.FLOAT, @@ -85,7 +82,6 @@ class OpSet11(OpSet10): return [min_node, max_node, node] def bilinear_interp(self, op, block): - print('bilinear') input_names = op.input_names coordinate_transformation_mode = '' align_corners = op.attr('align_corners') @@ -205,7 +201,6 @@ class OpSet11(OpSet10): roi_node = self.make_constant_node(roi_name, onnx_pb.TensorProto.FLOAT, [1, 1, 1, 1, 1, 1, 1, 1]) if 'OutSize' in input_names and len(op.input('OutSize')) > 0: - print('0000') node = helper.make_node( 'Resize', inputs=[op.input('X')[0], roi_name, op.input('OutSize')[0]], @@ -213,7 +208,6 @@ class OpSet11(OpSet10): mode='nearest', coordinate_transformation_mode=coordinate_transformation_mode) elif 'Scale' in input_names and len(op.input('Scale')) > 0: - print('1111') node = helper.make_node( 'Resize', inputs=[op.input('X')[0], roi_name, op.input('Scale')[0]], @@ -221,7 +215,6 @@ class OpSet11(OpSet10): mode='nearest', coordinate_transformation_mode=coordinate_transformation_mode) else: - print('2222') out_shape = [op.attr('out_h'), op.attr('out_w')] scale = op.attr('scale') if out_shape.count(-1) > 0: -- GitLab