electriclilies commented on a change in pull request #6298:
URL: https://github.com/apache/incubator-tvm/pull/6298#discussion_r472576703
##########
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:
The bilinear and half_pixel combination is giving me an error in the
resize test, so I thought is was another invalid combination. I just tried to
replicate the bilinear half_pixel topi test in relay, but I get an error.
The input to the bilinear and half_pixel combination test_topi_python is
verify_resize(4, 16, 16, 16, 32, 32, 'NCHW', "half_pixel", method="bilinear"),
which passes in a shape of (4, 16, 16, 16) and resizes it to (4, 16, 32, 32)
using the topi resize method. This passes.
For the relay resize function, if I pass in (4, 16, 16, 16) as the shape,
and try to resize it using scale 2, we get an output shape of (4, 16, 32, 32),
which is correct, but the test fails the test due output mismatch. I'm not
entirely sure what's going on here, I'll look into it more tomorrow and post an
update.. if either of you have any insight let me know
----------------------------------------------------------------
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]