Skip to content

Commit

Permalink
Use numpy_cosine_similarity_distance on the arrays
Browse files Browse the repository at this point in the history
Co-authored-by: Dhruv Nair <[email protected]>
  • Loading branch information
ilisparrow and DN6 authored Oct 27, 2023
1 parent 0528498 commit ec6bf81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def test_canny(self):
assert images[0].shape == (768, 512, 3)

original_image = images[0, -3:, -3:, -1].flatten()
expected_image = np.array([0.5226907, 0.5272584, 0.52255356, 0.50762856, 0.50497484, 0.50656825, 0.5065469, 0.51809096, 0.48973307])
assert numpy_cosine_similarity_distance(original_image, expected_image) < 1e-4
assert np.allclose(original_image, expected_image, atol=1e-04)


Expand Down

0 comments on commit ec6bf81

Please sign in to comment.