You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/08/18 11:48:21 UTC

[GitHub] [incubator-tvm] masahi commented on issue #6237: Resize produces incorrect results

masahi commented 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)
   
   ```


----------------------------------------------------------------
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:
users@infra.apache.org