Skip to content

Commit

Permalink
Add another unit test to ensure correctness of pixel attention mask p…
Browse files Browse the repository at this point in the history
…lacement
  • Loading branch information
xenova committed Dec 2, 2024
1 parent 2e0c5bd commit cadf689
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/processors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ describe("Processors", () => {
);
compare(rows, [[0], [0], [0, 0]]);
compare(cols, [[0], [0], [0, 0]]);

// Test that the order of the pixel attention mask matches the python implementation
compare(pixel_attention_mask.data.reduce((a, b, i) => a + i * b, 0), 228217205216);
}

{
Expand Down

0 comments on commit cadf689

Please sign in to comment.