Skip to content
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

Assertion Error #19

Open
DarrenZhang01 opened this issue Jul 30, 2020 · 0 comments
Open

Assertion Error #19

DarrenZhang01 opened this issue Jul 30, 2020 · 0 comments
Assignees

Comments

@DarrenZhang01
Copy link
Owner

DarrenZhang01 commented Jul 30, 2020

As titled.

test_util.py", line 2397, in _assertArrayLikeAllClose
    np.testing.assert_allclose(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 1532, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 846, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-06, atol=1e-06
Mismatched value: a is different from b. 
not close where = (array([0, 0, 1, 1]), array([0, 1, 0, 1]))
not close lhs = [0.8718173  0.14334908 0.14334908 1.03472706]
not close rhs = [0.87206082 0.14346052 0.14346052 1.03333925]
not close dif = [0.00024352 0.00011144 0.00011144 0.00138781]
not close tol = [1.87206082e-06 1.14346052e-06 1.14346052e-06 2.03333925e-06]
dtype = float64, shape = (2, 2)
Mismatched elements: 4 / 4 (100%)
Max absolute difference: 0.00138781
Max relative difference: 0.00134303
 x: array([[0.871817, 0.143349],
       [0.143349, 1.034727]])
 y: array([[0.872061, 0.143461],
       [0.143461, 1.033339]])

In the test case test_sparse_inputs_act=relu_kernel=nngp (__main__.StaxTest) test_sparse_inputs_act=relu_kernel=nngp (__main__.StaxTest) test_sparse_inputs_act=relu_kernel=nngp(act='relu', kernel='nngp')

test_utils.py", line 155, in assertAllClose
    return super().assertAllClose(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/framework/test_util.py", line 1220, in decorated
    return f(*args, **kwds)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/framework/test_util.py", line 2609, in assertAllClose
    self._assertAllCloseRecursive(a, b, rtol=rtol, atol=atol, msg=msg)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/framework/test_util.py", line 2563, in _assertAllCloseRecursive
    self._assertArrayLikeAllClose(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tensorflow/python/framework/test_util.py", line 2503, in _assertArrayLikeAllClose
    np.testing.assert_allclose(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 1532, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 846, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-06, atol=1e-06
Mismatched value: a is different from b. 
not close where = (array([0, 0, 1, 1]), array([0, 1, 0, 1]))
not close lhs = [0.43590865 0.14724569 0.14724569 0.51736353]
not close rhs = [0.43553051 0.14626149 0.14626149 0.51598772]
not close dif = [0.00037814 0.0009842  0.0009842  0.00137581]
not close tol = [1.43553051e-06 1.14626149e-06 1.14626149e-06 1.51598772e-06]
dtype = float64, shape = (2, 2)
Mismatched elements: 4 / 4 (100%)
Max absolute difference: 0.00137581
Max relative difference: 0.00672904
 x: array([[0.435909, 0.147246],
       [0.147246, 0.517364]])
 y: array([[0.435531, 0.146261],
       [0.146261, 0.515988]])
@DarrenZhang01 DarrenZhang01 self-assigned this Jul 30, 2020
@DarrenZhang01 DarrenZhang01 reopened this Aug 9, 2020
@DarrenZhang01 DarrenZhang01 changed the title Assertion Error in np.testing.assert_all_close Assertion Error Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant