Skip to content

Commit

Permalink
add onnx ReduceSum (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhuohai authored Sep 2, 2022
1 parent b3d811b commit c5029c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/importer/onnx_/basic/test_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ def _make_module(in_type, in_shape, reduce_op, axes, keepdims):
[output],
initializer=initializers)

model_def = helper.make_model(graph_def, producer_name='onnx')
if reduce_op=='ReduceSum':
op = onnx.OperatorSetIdProto()
op.version = 11
model_def = helper.make_model(graph_def, producer_name='onnx', opset_imports=[op])
else:
model_def = helper.make_model(graph_def, producer_name='onnx')
return model_def


Expand All @@ -80,6 +85,7 @@ def _make_module(in_type, in_shape, reduce_op, axes, keepdims):
'ReduceMax',
'ReduceMean',
'ReduceMin',
'ReduceSum'
]

axes_list = [
Expand Down

0 comments on commit c5029c2

Please sign in to comment.