Image processing/etc.
numpy.testing.assert_allclose
유니디니
2020. 8. 6. 22:59
728x90
반응형
numpy.testing.assert_allclose(actual, desired, rtol=1e-07, atol = 0, equal_nan = True, err_msg='', verbose=True)
actual과 desired에 비교하고자 하는 값을 넣고, actual값과 desired값이 atol+rtol * abs(desired) 값의 범위를 넘어가면 에러 메세지를 일으킴.
*딥러닝 모델의 추론값을 서로 비교할 때 사용해도 좋음
참고자료
https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_allclose.html
https://jangjy.tistory.com/360?category=870456
반응형