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 2021/04/18 17:24:44 UTC

[GitHub] [tvm] K1504296 commented on issue #7470: [TEST][FLAKY] tests/python/relay/test_op_level5.py::test_crop_and_resize

K1504296 commented on issue #7470:
URL: https://github.com/apache/tvm/issues/7470#issuecomment-822027652


   Hello,
   Any updates on this? I'm consistently running into a similar error in verify_crop_and_resize() on aarch64 devices when running task_python_integration.py.
   
   ```
   tests/python/relay/test_op_level5.py:163: in verify_crop_and_resize
   tvm.testing.assert_allclose(op_res.asnumpy(), ref_res, rtol=1e-3, atol=1e-04)
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
   actual = array([[[[0.7755371 , 0.36136428, 0.49826235],
   [0.63967055, 0.5373034 , 0.4265945 ],
   [0.3071108 , 0....17595],
   [0.11378219, 0.1943004 , 0.47557598],
   [0.63771987, 0.7763749 , 0.4037985 ]]]], dtype=float32)
   desired = array([[[[0.77553688, 0.36136451, 0.49826134],
   [0.63966878, 0.53730296, 0.42659563],
   [0.30710987, 0.... , 0. ],
   [0. , 0. , 0. ],
   [0. , 0. , 0. ]]]])
   rtol = 0.001, atol = 0.0001
    
   def assert_allclose(actual, desired, rtol=1e-7, atol=1e-7):
   """Version of np.testing.assert_allclose with `atol` and `rtol` fields set
   in reasonable defaults.
    
   Arguments `actual` and `desired` are not interchangable, since the function
   compares the `abs(actual-desired)` with `atol+rtol*abs(desired)`. Since we
   often allow `desired` to be close to zero, we generally want non-zero `atol`.
   """
   actual = np.asanyarray(actual)
   desired = np.asanyarray(desired)
   np.testing.assert_allclose(actual.shape, desired.shape)
   > np.testing.assert_allclose(actual, desired, rtol=rtol, atol=atol, verbose=True)
   E AssertionError:
   E Not equal to tolerance rtol=0.001, atol=0.0001
   E
   E Mismatched elements: 90 / 3600 (2.5%)
   E Max absolute difference: 0.98851174
   E Max relative difference: 9.95329627e-05
   E x: array([[[[0.775537, 0.361364, 0.498262],
   E [0.639671, 0.537303, 0.426594],
   E [0.307111, 0.262529, 0.711934],...
   E y: array([[[[0.775537, 0.361365, 0.498261],
   E [0.639669, 0.537303, 0.426596],
   E [0.30711 , 0.262528, 0.711934],...
    
   python/tvm/testing.py:82: AssertionError
   ```


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