masahi commented on a change in pull request #6298:
URL: https://github.com/apache/incubator-tvm/pull/6298#discussion_r472560621
##########
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:
Looking at the test cases in topi
https://github.com/apache/incubator-tvm/blob/master/tests/python/topi/python/test_topi_image.py#L69-L83,
I think the valid combination is
* nearest + asymmetric
* bilinear + align_corners or half_pixel
@electriclilies please allow bilinear + half_pixel option.
I don't know about bicubic, since it is not tested. @jwfromm
----------------------------------------------------------------
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]