masahi commented on a change in pull request #5204: [Frontend][Torch] Fix up
graph input handling
URL: https://github.com/apache/incubator-tvm/pull/5204#discussion_r401731798
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -1007,16 +1007,13 @@ def _get_input_names(node_or_graph):
return [inp.debugName() for inp in node_or_graph.inputs()]
-def _get_op_inputs(op_node, outputs, output_index_map):
- input_names = [output_index_map[name]
- for name in _get_input_names(op_node)]
- return [outputs[name] for name in input_names]
+def _get_op_inputs(op_node, input_vars):
+ return [input_vars[name] for name in _get_input_names(op_node)]
-def _update_outputs_from_pairs(name_output_pairs, outputs, output_index_map):
- for output_name, output in name_output_pairs:
- output_index_map[output_name] = len(outputs)
- outputs.append(output)
+def _update_inputs_from_pairs(name_input_pairs, input_vars):
Review comment:
I think we don't need this function anymore. Dict's `update` method can be
used.
----------------------------------------------------------------
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]
With regards,
Apache Git Services