mbrookhart commented on a change in pull request #6298:
URL: https://github.com/apache/incubator-tvm/pull/6298#discussion_r472442117
##########
File path: tests/python/relay/test_op_level5.py
##########
@@ -67,6 +69,7 @@ def verify_resize(dshape, scale, method, layout):
for method in ["bilinear", "nearest_neighbor"]:
for layout in ["NHWC", "NCHW"]:
verify_resize((1, 4, 4, 4), 2, method, layout)
+ verify_resize((2, 8, 17, 20), 2, method, layout)
Review comment:
Can we also add a test case with a different scale?
##########
File path: python/tvm/topi/image/resize.py
##########
@@ -529,8 +529,12 @@ def resize(data, size, layout="NCHW", method="bilinear",
or [batch, in_height*scale, in_width*scale, channel]
or 5-D with shape [batch, channel-major, in_height*scale,
in_width*scale, channel-minor]
"""
-
method = method.lower()
+ if ((method == "nearest_neighbor" and coordinate_transformation_mode ==
"align_corners") or
+ (method == "bilinear" and coordinate_transformation_mode !=
"align_corners")):
+ raise ValueError('Topi Resize does not support the combination of
method %s ' \
+ 'and coordinate_transformation_mode %s' %
+ (method, coordinate_transformation_mode))
Review comment:
@masahi any restrictions on bicubic?
----------------------------------------------------------------
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]