提交 53071d03 编写于 作者: R root

delete comment

上级 d43b27d8
...@@ -545,9 +545,6 @@ class SymbolicShapeInference: ...@@ -545,9 +545,6 @@ class SymbolicShapeInference:
self.sympy_data_[node.output[0]] = data self.sympy_data_[node.output[0]] = data
new_shape = np.array(data).shape new_shape = np.array(data).shape
vi = self.known_vi_[node.output[0]] 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): def _pass_on_sympy_data(self, node):
assert len(node.input) == 1 or node.op_type == 'Reshape' assert len(node.input) == 1 or node.op_type == 'Reshape'
...@@ -854,12 +851,7 @@ class SymbolicShapeInference: ...@@ -854,12 +851,7 @@ class SymbolicShapeInference:
axis = handle_negative_axis( axis = handle_negative_axis(
get_attribute(node, 'axis', 0), len(data_shape)) get_attribute(node, 'axis', 0), len(data_shape))
indices_shape = self._get_shape(node, 1) 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:] new_shape = data_shape[:axis] + indices_shape + data_shape[axis + 1:]
#print(new_shape)
vi = self.known_vi_[node.output[0]] vi = self.known_vi_[node.output[0]]
vi.CopyFrom( vi.CopyFrom(
helper.make_tensor_value_info(node.output[ helper.make_tensor_value_info(node.output[
......
...@@ -769,7 +769,7 @@ def yolo_box(op, block): ...@@ -769,7 +769,7 @@ def yolo_box(op, block):
inputs=outputs_pred_box_x1_decode, inputs=outputs_pred_box_x1_decode,
outputs=outputs_pred_box_x1_clip, outputs=outputs_pred_box_x1_clip,
min=0.0, min=0.0,
max=MAX_FLOAT32) max=float(MAX_FLOAT32))
node_list.append(node_pred_box_x1_clip) node_list.append(node_pred_box_x1_clip)
node_pred_box_y1_clip = onnx.helper.make_node( node_pred_box_y1_clip = onnx.helper.make_node(
...@@ -777,7 +777,7 @@ def yolo_box(op, block): ...@@ -777,7 +777,7 @@ def yolo_box(op, block):
inputs=outputs_pred_box_y1_decode, inputs=outputs_pred_box_y1_decode,
outputs=outputs_pred_box_y1_clip, outputs=outputs_pred_box_y1_clip,
min=0.0, min=0.0,
max=MAX_FLOAT32) max=float(MAX_FLOAT32))
node_list.append(node_pred_box_y1_clip) node_list.append(node_pred_box_y1_clip)
node_pred_box_x2_clip = onnx.helper.make_node( node_pred_box_x2_clip = onnx.helper.make_node(
...@@ -785,7 +785,7 @@ def yolo_box(op, block): ...@@ -785,7 +785,7 @@ def yolo_box(op, block):
inputs=outputs_pred_box_x2_sub_w, inputs=outputs_pred_box_x2_sub_w,
outputs=outputs_pred_box_x2_clip, outputs=outputs_pred_box_x2_clip,
min=0.0, min=0.0,
max=MAX_FLOAT32) max=float(MAX_FLOAT32))
node_list.append(node_pred_box_x2_clip) node_list.append(node_pred_box_x2_clip)
node_pred_box_y2_clip = onnx.helper.make_node( node_pred_box_y2_clip = onnx.helper.make_node(
...@@ -793,7 +793,7 @@ def yolo_box(op, block): ...@@ -793,7 +793,7 @@ def yolo_box(op, block):
inputs=outputs_pred_box_y2_sub_h, inputs=outputs_pred_box_y2_sub_h,
outputs=outputs_pred_box_y2_clip, outputs=outputs_pred_box_y2_clip,
min=0.0, min=0.0,
max=MAX_FLOAT32) max=float(MAX_FLOAT32))
node_list.append(node_pred_box_y2_clip) node_list.append(node_pred_box_y2_clip)
outputs_pred_box_x2_res = [model_name + "@box_x2_res"] outputs_pred_box_x2_res = [model_name + "@box_x2_res"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册