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 17deb78 commit 0528498
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -623,5 +623,5 @@ def test_canny_lora(self):

original_image = images[0, -3:, -3:, -1].flatten()
expected_image = np.array([0.50346327, 0.50708383, 0.50719553, 0.5135172, 0.5155377, 0.5066059, 0.49680984, 0.5005894, 0.48509413])
assert np.allclose(original_image, expected_image, atol=1e-04)
assert numpy_cosine_similarity_distance(original_image, expected_image) < 1e-4

0 comments on commit 0528498

Please sign in to comment.