From 53071d031533459b5e13f2df0930a662a582c392 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 28 Jul 2020 07:16:46 +0000 Subject: [PATCH] delete comment --- x2paddle/decoder/onnx_shape_inference.py | 8 -------- .../paddle2onnx/opset9/paddle_custom_layer/yolo_box.py | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/x2paddle/decoder/onnx_shape_inference.py b/x2paddle/decoder/onnx_shape_inference.py index 303fc29..dae2d02 100644 --- a/x2paddle/decoder/onnx_shape_inference.py +++ b/x2paddle/decoder/onnx_shape_inference.py @@ -545,9 +545,6 @@ class SymbolicShapeInference: self.sympy_data_[node.output[0]] = data new_shape = np.array(data).shape vi = self.known_vi_[node.output[0]] - #print(node.output[0]) - #print(new_shape) - #vi.CopyFrom(helper.make_tensor_value_info(node.output[0], self.known_vi_[node.input[0]].type.tensor_type.elem_type, list(new_shape))) def _pass_on_sympy_data(self, node): assert len(node.input) == 1 or node.op_type == 'Reshape' @@ -854,12 +851,7 @@ class SymbolicShapeInference: axis = handle_negative_axis( get_attribute(node, 'axis', 0), len(data_shape)) indices_shape = self._get_shape(node, 1) - #if indices_shape == []: - # value = self._get_initializer_value(node, 1) - # if isinstance(value.tolist(), int): - # indices_shape = [1] new_shape = data_shape[:axis] + indices_shape + data_shape[axis + 1:] - #print(new_shape) vi = self.known_vi_[node.output[0]] vi.CopyFrom( helper.make_tensor_value_info(node.output[ diff --git a/x2paddle/op_mapper/paddle2onnx/opset9/paddle_custom_layer/yolo_box.py b/x2paddle/op_mapper/paddle2onnx/opset9/paddle_custom_layer/yolo_box.py index 521804c..63f9a9d 100644 --- a/x2paddle/op_mapper/paddle2onnx/opset9/paddle_custom_layer/yolo_box.py +++ b/x2paddle/op_mapper/paddle2onnx/opset9/paddle_custom_layer/yolo_box.py @@ -769,7 +769,7 @@ def yolo_box(op, block): inputs=outputs_pred_box_x1_decode, outputs=outputs_pred_box_x1_clip, min=0.0, - max=MAX_FLOAT32) + max=float(MAX_FLOAT32)) node_list.append(node_pred_box_x1_clip) node_pred_box_y1_clip = onnx.helper.make_node( @@ -777,7 +777,7 @@ def yolo_box(op, block): inputs=outputs_pred_box_y1_decode, outputs=outputs_pred_box_y1_clip, min=0.0, - max=MAX_FLOAT32) + max=float(MAX_FLOAT32)) node_list.append(node_pred_box_y1_clip) node_pred_box_x2_clip = onnx.helper.make_node( @@ -785,7 +785,7 @@ def yolo_box(op, block): inputs=outputs_pred_box_x2_sub_w, outputs=outputs_pred_box_x2_clip, min=0.0, - max=MAX_FLOAT32) + max=float(MAX_FLOAT32)) node_list.append(node_pred_box_x2_clip) node_pred_box_y2_clip = onnx.helper.make_node( @@ -793,7 +793,7 @@ def yolo_box(op, block): inputs=outputs_pred_box_y2_sub_h, outputs=outputs_pred_box_y2_clip, min=0.0, - max=MAX_FLOAT32) + max=float(MAX_FLOAT32)) node_list.append(node_pred_box_y2_clip) outputs_pred_box_x2_res = [model_name + "@box_x2_res"] -- GitLab