Skip to content

add inverse_block_masking#20

Open
Manishram-ai wants to merge 2 commits intoMedARC-AI:mainfrom
Manishram-ai:main
Open

add inverse_block_masking#20
Manishram-ai wants to merge 2 commits intoMedARC-AI:mainfrom
Manishram-ai:main

Conversation

@Manishram-ai
Copy link
Copy Markdown

@Manishram-ai Manishram-ai commented Nov 12, 2025

Added inverse_block_masking to masking.py

I tried to keep it like pytorch code using nn.Module. This code now looks similar to other masking implementation.

Thanks!

Edit:

  • Improved inverse masking that handles wrap-around, different aspect ratios, and makes sure there are enough visible patches in the block mask
  • Also added import statement for math, random and einops
  • Class InverseBlockMasking nn.Module is a wrapper to match other masking modules

@Manishram-ai Manishram-ai marked this pull request as ready for review November 12, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant