You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/03/08 19:45:38 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #19990: [v1.x] ONNX Type inference support

Zha0q1 commented on a change in pull request #19990:
URL: https://github.com/apache/incubator-mxnet/pull/19990#discussion_r589699727



##########
File path: python/mxnet/contrib/onnx/mx2onnx/export_onnx.py
##########
@@ -314,7 +325,24 @@ def create_onnx_graph_proto(self, sym, params, in_shape, in_type, verbose=False,
                     node_output_names = [converted[-1].name]
                 # process node outputs (sort by alphabetical order)
                 node_output_names.sort()
-                outputs_lookup.append(node_output_names)
+                # match the output names to output dtypes
+                if dtypes is not None:
+                    assert len(node_output_names) == len(dtypes)
+                    node_outputs = [NodeOutput(node_output_names[i], dtypes[i])
+                                    for i in range(len(dtypes))]
+                else:
+                    # in case dtypes is None, we just default to the dtype of the first input
+                    #TODO

Review comment:
       Yeah I refactored that part




----------------------------------------------------------------
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:
users@infra.apache.org