electriclilies commented on a change in pull request #6293:
URL: https://github.com/apache/incubator-tvm/pull/6293#discussion_r475884598
##########
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:
It should. The shape function copies the entire shape by iterating over
ndim, so all dimensions are copied before any swapping happens.
----------------------------------------------------------------
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:
[email protected]