Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ViT-S and drop_path_rate #160

Open
vladchimescu opened this issue Aug 14, 2023 · 3 comments
Open

ViT-S and drop_path_rate #160

vladchimescu opened this issue Aug 14, 2023 · 3 comments

Comments

@vladchimescu
Copy link

vladchimescu commented Aug 14, 2023

Hi,
I'm trying to train DINOv2 with the ViT-S backbone. I've noticed that the model training crashes if drop_path_rate > 0. In particular, I get the following error

RuntimeError: Expected source.size(1) % kNumElementsPerBlock == 0 to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)

with the traceback going all the way to line 173

As recommended in issue #108, one need to set drop_path_rate = 0 when using the ViT-S backbone. What is the reason for this behaviour? In the original DINO, the drop_path_rate = 0.1 for both ViT-S and ViT-B.

@qasfb
Copy link
Contributor

qasfb commented Sep 1, 2023

Sorry for the late reply; if this problem persists, does this PR fix it for you by any chance ? #195

@josephcappadona
Copy link

Yes, that worked for me, thank you! Except I had to add back the fmha import since it seems to have been mistakenly removed from the updated import statement.

@mehrnoosh-afshar
Copy link

Hi I have the same issue with drop_path_rate>0 for VIT-SMALL, can you let me know what is the reason and which commit you fix this issue? I am using the latest version of repo so far and issue still exist apperantly

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

No branches or pull requests

4 participants