提交 cafb4c66 编写于 作者: C Channingss

update

上级 686a9a99
...@@ -174,7 +174,8 @@ class OpSet9(object): ...@@ -174,7 +174,8 @@ class OpSet9(object):
inputs=[op.input('X')[0], temp_value], inputs=[op.input('X')[0], temp_value],
outputs=op.output('Out')) outputs=op.output('Out'))
return [shape_node, y_node, node] return [shape_node, y_node, node]
elif axis == -1 or axis == 0 or axis == (len(x_shape) - 1): elif axis == -1 or axis == (len(x_shape) - 1
) or len(x_shape) == len(y_shape):
node = helper.make_node( node = helper.make_node(
'Add', 'Add',
inputs=[op.input('X')[0], op.input('Y')[0]], inputs=[op.input('X')[0], op.input('Y')[0]],
...@@ -203,7 +204,8 @@ class OpSet9(object): ...@@ -203,7 +204,8 @@ class OpSet9(object):
inputs=[op.input('X')[0], temp_value], inputs=[op.input('X')[0], temp_value],
outputs=op.output('Out')) outputs=op.output('Out'))
return [shape_node, y_node, node] return [shape_node, y_node, node]
elif axis == -1 or axis == 0 or axis == (len(x_shape) - 1): elif axis == -1 or axis == (len(x_shape) - 1
) or len(x_shape) == len(y_shape):
node = helper.make_node( node = helper.make_node(
'Sub', 'Sub',
inputs=[op.input('X')[0], op.input('Y')[0]], inputs=[op.input('X')[0], op.input('Y')[0]],
...@@ -565,7 +567,7 @@ class OpSet9(object): ...@@ -565,7 +567,7 @@ class OpSet9(object):
input_shape = block.vars[op.input('X')[0]].shape input_shape = block.vars[op.input('X')[0]].shape
if op.attr('align_corners') or op.attr('align_mode') == 0: if op.attr('align_corners') or op.attr('align_mode') == 0:
raise Exception( raise Exception(
"Resize in onnx(opset<=10) only support coordinate_transformation_mode: 'asymmetric', Try converting with --onnx_opest 11" "Resize in onnx(opset<=10) only support coordinate_transformation_mode: 'asymmetric', Try converting with --onnx_opset 11"
) )
if ('OutSize' in input_names and len(op.input('OutSize')) > 0) or ( if ('OutSize' in input_names and len(op.input('OutSize')) > 0) or (
'SizeTensor' in input_names and 'SizeTensor' in input_names and
...@@ -763,7 +765,8 @@ class OpSet9(object): ...@@ -763,7 +765,8 @@ class OpSet9(object):
inputs=[op.input('X')[0], temp_value], inputs=[op.input('X')[0], temp_value],
outputs=op.output('Out')) outputs=op.output('Out'))
return [shape_node, y_node, node] return [shape_node, y_node, node]
elif axis == -1 or axis == 0 or axis == (len(x_shape) - 1): elif axis == -1 or axis == (len(x_shape) - 1
) or len(x_shape) == len(y_shape):
node = helper.make_node( node = helper.make_node(
'Mul', 'Mul',
inputs=[op.input('X')[0], op.input('Y')[0]], inputs=[op.input('X')[0], op.input('Y')[0]],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册