Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Allow multiple output support
Browse files Browse the repository at this point in the history
  • Loading branch information
vandanavk committed Dec 26, 2018
1 parent 9365023 commit 81fb2f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/mxnet/contrib/onnx/mx2onnx/export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def get_outputs(sym, params, in_shape, in_label):
if name.endswith('_output'):
out_names.append(name[:-len('_output')])
else:
logging.warning("output '%s' does not end with '_output'", name)
logging.info("output '%s' does not end with '_output'", name)
out_names.append(name)

assert len(out_shapes) == len(out_names)
Expand Down
6 changes: 4 additions & 2 deletions tests/python-pytest/onnx/backend_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ def run(self, inputs, **kwargs):
args = dict(zip(data_names, data_forward))
exe = self.symbol.bind(ctx, args=args, aux_states=self.aux_params)
exe.forward(is_train=False)
result = exe.outputs[0].asnumpy()
return [result]
result = []
for output in exe.outputs:
result.append(output.asnumpy())
return result


# GluonBackendRep object will be returned by GluonBackend's prepare method which is used to
Expand Down

0 comments on commit 81fb2f0

Please sign in to comment.