You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/03/20 02:35:33 UTC

[GitHub] [incubator-tvm] MarisaKirisame commented on a change in pull request #5098: [TOPI][RELAY]Global MaxPool3d and AvgPool3d topi & relay implementation

MarisaKirisame commented on a change in pull request #5098: [TOPI][RELAY]Global MaxPool3d and AvgPool3d topi & relay implementation
URL: https://github.com/apache/incubator-tvm/pull/5098#discussion_r395415481
 
 

 ##########
 File path: python/tvm/relay/op/nn/nn.py
 ##########
 @@ -943,6 +943,76 @@ def global_avg_pool2d(data,
     return _make.global_avg_pool2d(data, layout)
 
 
+def global_max_pool3d(data,
+                      layout="NCDHW"):
+    r"""3D global maximum pooling operator.
+
+    This operator takes data as input and does 3D max value calculation
+    across each window represented by DxWxH.
+
+
+    In the default case, where the data_layout is `NCDHW`
+    a data Tensor with shape `(batch_size, in_channels, depth, height, width)`,
+    to produce an output Tensor with the following rule:
+
+    with data of shape (b, c, d, h, w)
+
+    .. math::
+
+        \mbox{out}(b, c, 1, 1, 1)  =  \max_{l=0, \ldots, d},  \max_{m=0, \ldots, h},
+              \max_{n=0, \ldots, w} \mbox{datam}(b, c, l, m, n)
+
+    Parameters
+    ----------
+    data : tvm.relay.Expr
+        The input data to the operator.
+
+    layout : str, optional
 
 Review comment:
   Optional[str]
   ```suggestion
       layout : str, optional
   ```

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


With regards,
Apache Git Services