leandron commented on a change in pull request #6296:
URL: https://github.com/apache/incubator-tvm/pull/6296#discussion_r472212769
##########
File path: python/tvm/relay/frontend/coreml.py
##########
@@ -474,7 +484,7 @@ def coreml_op_to_relay(op, inname, outname, etab):
inname : str or list of str
Name of the input Relay expression.
- outname : str
+ outnames : str
Review comment:
Is this also expected to be `str or list of str`, based on usage on line
509?
##########
File path: python/tvm/relay/frontend/coreml.py
##########
@@ -488,9 +498,16 @@ def coreml_op_to_relay(op, inname, outname, etab):
insym = etab.get_expr(inname)
else:
insym = [etab.get_expr(i) for i in inname]
- ret = _convert_map[classname](op, insym, etab)
- if outname:
- etab.set_expr(outname, ret, force_override=True)
+ outs = _convert_map[classname](op, insym, etab)
+
+ if outnames:
+ if isinstance(outnames, _base.string_types) or len(outnames) == 1:
+ outname = outnames if isinstance(outnames, _base.string_types)
else outnames[0]
+ etab.set_expr(outname, outs, force_override=True)
+ else:
+ assert len(outnames) == len(outs)
Review comment:
minor suggestion: it would be helpful to have a message for the
assertion here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]