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

Commit

Permalink
Multiple output support in gluon backendrep
Browse files Browse the repository at this point in the history
  • Loading branch information
vandanavk committed Dec 26, 2018
1 parent 499f2fc commit dc01588
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/python-pytest/onnx/backend_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ def run(self, inputs, **kwargs):
net_inputs = [nd.array(input_data, ctx=ctx) for input_data in inputs]
net_outputs = self.net(*net_inputs)
results = []
results.extend([o for o in net_outputs.asnumpy()])
result = np.array(results)
if isinstance(net_outputs, list):
for output in net_outputs:
results.append(output.asnumpy())
result = results
else:
results.extend([o for o in net_outputs.asnumpy()])
result = [np.array(results)]

return [result]
return result

0 comments on commit dc01588

Please sign in to comment.