[superglue] Fixed the way batch mask was applied to the scores before match assignment computation (#39968)

fix: mask filling to score was wrong
This commit is contained in:
StevenBucaille
2025-08-07 04:49:39 -04:00
committed by GitHub
parent 2593932f10
commit cdeaad96b7
2 changed files with 6 additions and 2 deletions

View File

@@ -423,3 +423,5 @@ class SuperGlueModelIntegrationTest(unittest.TestCase):
torch.sum(~torch.isclose(predicted_matching_scores_values, expected_matching_scores_values, atol=1e-2)) < 4
)
self.assertTrue(torch.sum(predicted_matches_values != expected_matches_values) < 4)
self.assertTrue(torch.all(outputs.matches[0, 1] < torch.sum(outputs.mask[0, 0])))
self.assertTrue(torch.all(outputs.matches[0, 0] < torch.sum(outputs.mask[0, 1])))