jankrepl / mildlyoverfitted

Paper implementations from scratch and machine learning tutorials
MIT License
340 stars 124 forks source link

Issue in verify.py file execution #1

Closed Ravihari123 closed 3 years ago

Ravihari123 commented 3 years ago

Thank you for the codes and video explanation. I got the following issue while running the verify.py file. I could run custom.py without any error and I have installed python 3.9, PyTorch version 1.8. I did all the verification related to the availability of the vit_base_patch16_384 patch in the vision_transformer.py file. This is the error I got. Could you please help me to solve this issue? Issue

jankrepl commented 3 years ago

Hey there and thanks for you interest!

I am not able to reproduce it on my computer. However, looking at your tracebook it seems like the following should reproduce your error. Could you try it?

python -c 'import timm;timm.create_model("vit_base_patch16_384", pretrained=True)'

If it is the case maybe your checkpoint is corrupted (my best guess). I would suggest you just delete it and retrigger a new download. On my computer it is stored under

$HOME/.cache/torch/hub/checkpoints/B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0--imagenet2012-steps_20k-lr_0.01-res_384.npz

(HOME is the home folder). Once you delete it, try running the above code snippet again and maybe this time around it is gonna work:)

Ravihari123 commented 3 years ago

It worked!! Thank you very much :)

jankrepl commented 3 years ago

Perfect! I am closing this issue then!