Skip to content

Commit

Permalink
Fixing flaky inference test
Browse files Browse the repository at this point in the history
  • Loading branch information
rwightman committed Jul 3, 2024
1 parent 6a5068e commit 5373a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_inference_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ def test_inference_simple(

text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)

assert text_probs.cpu().numpy()[0].tolist() == [1.0, 0.0, 0.0]
assert torch.allclose(text_probs.cpu()[0], torch.tensor([1.0, 0.0, 0.0]))

0 comments on commit 5373a56

Please sign in to comment.