-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resize produces incorrect results #6237
Comments
Using 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 #6198.
@electriclilies A PR welcome, or you can add the fix above to one of your on going PRs. |
Proposed fix is in #6298 |
The relay reshape function produces incorrect results. For scale factors other than 2, the output of relay.resize does not match the testing function.
The test I changed:
--- a/tests/python/relay/test_op_level5.py
+++ b/tests/python/relay/test_op_level5.py
@@ -66,7 +66,7 @@ def test_resize():
tvm.testing.assert_allclose(op_res.asnumpy(), ref_res, rtol=1e-4, atol=1e-6)
for method in ["bilinear", "nearest_neighbor"]:
for layout in ["NHWC", "NCHW"]:
- verify_resize((1, 4, 4, 4), 2, method, layout)
+ verify_resize((1, 4, 4, 4), 7, method, layout)
In this particular case, we get this error:
cc @mbrookhart
The text was updated successfully, but these errors were encountered: