facebookresearch / dino

PyTorch code for Vision Transformers training with the Self-Supervised learning method DINO
Apache License 2.0
6.06k stars 885 forks source link

torch hubconf.py is missing a function #243

Open nkondapa opened 1 year ago

nkondapa commented 1 year ago

File "/root/.cache/torch/hub/facebookresearch_dino_main/hubconf.py", line 17, in import vision_transformer as vits File "/root/.cache/torch/hub/facebookresearch_dino_main/vision_transformer.py", line 24, in from utils import truncnormal

torch version is torch==1.13.1

arnaghosh commented 2 weeks ago

Hi, I am facing the same issue. Is there any update on this?

arnaghosh commented 2 weeks ago

I was able to get it working by copying the utils.py file from this repository (or from the torch hub cache directory) to my local project directory. Currently, python compiler is unable to resolve the name utils and struggles to find the correct file to look for the function that needs to be imported. But having a better fix for this would be nice!

nkondapa commented 1 week ago

Hey, I think I also fixed it by commenting something out. Don't remember exactly.