Skip to content

Commit

Permalink
add onnx ReduceSum
Browse files Browse the repository at this point in the history
  • Loading branch information
xhuohai committed Sep 1, 2022
1 parent 6925ee3 commit a8334b5
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 a8334b5

Please sign in to comment.