Skip to content

Commit 8d8e91e

Browse files
authored
Merge pull request #667 from yeliang2258/fix_box_coder_dev
fix box_coder
2 parents 9a89ef3 + b2fc8f6 commit 8d8e91e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

paddle2onnx/op_mapper/detection/box_coder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def opset_7(cls, graph, node, **kw):
354354
for input_name, output_name in zip(outputs_output_point1,
355355
ouputs_points_unsqueeze):
356356
tmp_node = mapper_helper.unsqueeze_helper(
357-
graph, input_name, [len(output_shape_step1)], [output_name])
357+
graph, input_name, [len(output_shape_step1)], output_name)
358358
outputs_points_unsqueeze_list = [
359359
output[0] for output in ouputs_points_unsqueeze
360360
]

paddle2onnx/op_mapper/mapper_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ def unsqueeze_helper(graph, input, axes, outputs=None):
4545
inputs.append(input[0])
4646
if not isinstance(axes, list):
4747
axes = [axes]
48-
if outputs is not None and not isinstance(outputs, list):
48+
if outputs is not None and isinstance(outputs, six.string_types):
4949
outputs = [outputs]
50+
5051
if graph.opset_version < 13:
5152
unsqueeze_node = graph.make_node(
5253
"Unsqueeze", inputs=inputs, outputs=outputs, axes=axes)

0 commit comments

Comments
 (0)