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/08/24 20:41:03 UTC

[GitHub] [incubator-tvm] icemelon9 commented on a change in pull request #6293: [DYN][RELAY] Resize support for NCHW-convertible layouts

icemelon9 commented on a change in pull request #6293:
URL: https://github.com/apache/incubator-tvm/pull/6293#discussion_r475880977



##########
File path: python/tvm/relay/op/dyn/image/_image.py
##########
@@ -67,10 +57,19 @@ def resize_shape_func(attrs, inputs, _):
     Shape function for dyn.image.resize op.
     """
     layout = attrs.layout
-    if layout == 'NHWC':
-        out = [_NHWC_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)))]
-    elif (layout == 'NCHW') or nchw_pack_layout(layout) or nchw_xc_layout(layout):
-        out = [_NCHW_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)))]
+    if nchw_pack_layout(layout) or nchw_xc_layout(layout):
+        out = [_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)),
+                                  convert(2), convert(3), convert(1))]

Review comment:
       Does the shape function work for `NCHWc` layout?




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