masahi edited a comment on issue #6237:
URL: https://github.com/apache/incubator-tvm/issues/6237#issuecomment-675430935


   Using `align_corner` option with nearest is a mistake: 
https://github.com/apache/incubator-tvm/blob/master/tests/python/relay/test_op_level5.py#L56
   
   For nearest, I think the coordinate transform option should always be 
assymetric. The following should fix the test. The same fix should be applied 
to the dynamic one added in https://github.com/apache/incubator-tvm/pull/6198. 
   
   ```
   coord_trans = "align_corners"
   if method == "nearest_neighbor":
       coord_trans = "asymmetric"
   
   z = relay.image.resize(x, size, layout, method,
                          coordinate_transformation_mode=coord_trans)
   
   ```
   
   @electriclilies A PR welcome, or you can add the fix above to one of your on 
going PRs.


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


Reply via email to