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/02/01 22:41:48 UTC

[GitHub] [incubator-mxnet] josephevans commented on a change in pull request #19814: [v1.x] Onnx export support for ROIAlign

josephevans commented on a change in pull request #19814:
URL: https://github.com/apache/incubator-mxnet/pull/19814#discussion_r568191080



##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -3555,3 +3555,42 @@ def convert_broadcast_like(node, **kwargs):
     ]
 
     return nodes
+
+
+@mx_op.register('_contrib_ROIAlign')
+def convert_contrib_roialign(node, **kwargs):
+    """Map MXNet's _contrib_ROIAlign
+    """
+    from onnx.helper import make_node
+    from onnx import TensorProto
+    name, input_nodes, attrs = get_inputs(node, kwargs)
+
+    pooled_size = convert_string_to_list(str(attrs.get('pooled_size')))
+    spatial_scale = float(attrs.get('spatial_scale'))
+    sample_ratio = int(attrs.get('sample_ratio', '0'))
+    position_sensitive = attrs.get('position_sensitive', 'False')
+    aligned = attrs.get('aligned', 'False')
+
+    '''

Review comment:
       Should these checks be commented out?




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