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 2018/11/20 18:52:15 UTC

[GitHub] vandanavk commented on a change in pull request #12399: ONNX export: Add Crop, Deconvolution and fix the default stride of Pooling to 1

vandanavk commented on a change in pull request #12399: ONNX export: Add Crop, Deconvolution and fix the default stride of Pooling to 1
URL: https://github.com/apache/incubator-mxnet/pull/12399#discussion_r235127039
 
 

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
 ##########
 @@ -219,6 +219,85 @@ def convert_convolution(node, **kwargs):
     return [conv_node]
 
 
+@mx_op.register("Deconvolution")
+def convert_deconvolution(node, **kwargs):
+    """Map MXNet's deconvolution operator attributes to onnx's ConvTranspose operator
+    and return the created node.
+    """
+    name, inputs, attrs = get_inputs(node, kwargs)
+
+    num_inputs = len(inputs)
+
+    proc_nodes = kwargs["proc_nodes"]
+    input_node = proc_nodes[kwargs["index_lookup"][inputs[0][0]]].name
+    weights_node = proc_nodes[kwargs["index_lookup"][inputs[1][0]]].name
 
 Review comment:
   input_nodes returned by get_inputs() already has all the node names. Lines 231-236, 247-249 are not required on the latest code. directly pass input_nodes in make_node

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services