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/05/19 09:13:44 UTC

[GitHub] [incubator-mxnet] lordofgod opened a new pull request #20281: Update _op_translations.py for issue #20280

lordofgod opened a new pull request #20281:
URL: https://github.com/apache/incubator-mxnet/pull/20281


   ## Description ##
   Modidy output_padding of convert_deconvolution in _op_translations.py to fix issue #20280 


-- 
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



[GitHub] [incubator-mxnet] lordofgod commented on a change in pull request #20281: Update _op_translations.py for issue #20280

Posted by GitBox <gi...@apache.org>.
lordofgod commented on a change in pull request #20281:
URL: https://github.com/apache/incubator-mxnet/pull/20281#discussion_r635717650



##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -243,7 +243,8 @@ def convert_deconvolution(node, **kwargs):
     pad_dims = list(parse_helper(attrs, "pad", [0, 0]))
     num_group = int(attrs.get("num_group", 1))
     dilations = list(parse_helper(attrs, "dilate", [1, 1]))
-    adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    # adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    adj_dims = list(parse_helper(attrs, "adj", [0]*(2*len(kernel_dims))))  # modified for wrong "output_padding" converting while "adj" not setted in "deconvolution"

Review comment:
       @szha done




-- 
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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #20281: Update _op_translations.py for issue #20280

Posted by GitBox <gi...@apache.org>.
szha commented on a change in pull request #20281:
URL: https://github.com/apache/incubator-mxnet/pull/20281#discussion_r637022615



##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -243,7 +243,7 @@ def convert_deconvolution(node, **kwargs):
     pad_dims = list(parse_helper(attrs, "pad", [0, 0]))
     num_group = int(attrs.get("num_group", 1))
     dilations = list(parse_helper(attrs, "dilate", [1, 1]))
-    adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    adj_dims = list(parse_helper(attrs, "adj", [0]*(2*len(kernel_dims))))  # modified for wrong "output_padding" converting while "adj" not setted in "deconvolution"

Review comment:
       ```suggestion
       adj_dims = list(parse_helper(attrs, "adj", [0]*(2*len(kernel_dims))))
   ```




-- 
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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #20281: Update _op_translations.py for issue #20280

Posted by GitBox <gi...@apache.org>.
szha commented on a change in pull request #20281:
URL: https://github.com/apache/incubator-mxnet/pull/20281#discussion_r636229940



##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -243,7 +243,7 @@ def convert_deconvolution(node, **kwargs):
     pad_dims = list(parse_helper(attrs, "pad", [0, 0]))
     num_group = int(attrs.get("num_group", 1))
     dilations = list(parse_helper(attrs, "dilate", [1, 1]))
-    adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    adj_dims = list(parse_helper(attrs, "adj", [0]*(2*len(kernel_dims))))  # modified for wrong "output_padding" converting while "adj" not setted in "deconvolution"

Review comment:
       the comment for this line becomes inaccurate after the fix, hence we should not keep it in the code.




-- 
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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #20281: Update _op_translations.py for issue #20280

Posted by GitBox <gi...@apache.org>.
szha commented on a change in pull request #20281:
URL: https://github.com/apache/incubator-mxnet/pull/20281#discussion_r635625715



##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -243,7 +243,8 @@ def convert_deconvolution(node, **kwargs):
     pad_dims = list(parse_helper(attrs, "pad", [0, 0]))
     num_group = int(attrs.get("num_group", 1))
     dilations = list(parse_helper(attrs, "dilate", [1, 1]))
-    adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    # adj_dims = list(parse_helper(attrs, "adj", [0, 0]))
+    adj_dims = list(parse_helper(attrs, "adj", [0]*(2*len(kernel_dims))))  # modified for wrong "output_padding" converting while "adj" not setted in "deconvolution"

Review comment:
       remove comments




-- 
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