szha commented on a change in pull request #7938: instance norm and reflection 
padding
URL: https://github.com/apache/incubator-mxnet/pull/7938#discussion_r165726019
 
 

 ##########
 File path: python/mxnet/gluon/nn/conv_layers.py
 ##########
 @@ -1007,3 +1008,37 @@ def __init__(self, layout='NCDHW', **kwargs):
         assert layout == 'NCDHW', "Only supports NCDHW layout for now"
         super(GlobalAvgPool3D, self).__init__(
             (1, 1, 1), None, 0, True, True, 'avg', **kwargs)
+
+
+class ReflectionPad2D(HybridBlock):
+    """Pads the input tensor using the reflection of the input boundary.
+
+    Parameters
+    ----------
+    padding: int or a tuple of int
+        An integer padding width for height and weight or a tuple of
+        integers padding widths for each axis of the format ``(before_1, 
after_1, ... ,
+        before_N, after_N)``. The `padding` should be of length ``2*N`` where 
``N``
 
 Review comment:
   Since the class name says 2D, it should support 2D.
   
   You can do something similar to the conv blocks, with a common abstract 
class for the forward logic, and the actual 1D/2D/3D classes for specific 
implementation.

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


With regards,
Apache Git Services

Reply via email to