Giter VIP home page Giter VIP logo

Comments (10)

Ir1d avatar Ir1d commented on June 15, 2024 4

Have you tried this?

  1. rename utils.py to vit_utils.py in facebookresearch_dino_main directory
  2. change from utils import to from vit_utils import

from sinnerf.

dlutzzw avatar dlutzzw commented on June 15, 2024 2

it seems to be some loading issue. maybe try modifying the /home/zhangzhongwei18/.cache/torch/hub/facebookresearch_dino_main/vision_transformer.py to make it work

ok,thanks for your reply ,I've solved this problem by referring to this: ultralytics/yolov5#2414

from sinnerf.

OvOtoQAQ avatar OvOtoQAQ commented on June 15, 2024 1

Have you tried this?

  1. rename utils.py to vit_utils.py in facebookresearch_dino_main directory
  2. change from utils import to from vit_utils import

not yet, but as it all goes well now I dare not to change anything.
I think maybe it's about module remaining in cache or something like that as mentioned before yolov5/issues/2414
rather than path issue nor reuse name problem, since pop works well, I think it's good to just pop the utils out :)

from sinnerf.

Ir1d avatar Ir1d commented on June 15, 2024

it seems to be some loading issue. maybe try modifying the /home/zhangzhongwei18/.cache/torch/hub/facebookresearch_dino_main/vision_transformer.py to make it work

from sinnerf.

Ir1d avatar Ir1d commented on June 15, 2024

Thanks for letting me know!

from sinnerf.

OvOtoQAQ avatar OvOtoQAQ commented on June 15, 2024

Hi, sorry to bother you. I have a excatly same issue as yours and I'm a freshman so that it's really hard for me to fix it, could you please show me more details about how to modify the code? I'd appreciate it if you can write back, all the best:)

from sinnerf.

OvOtoQAQ avatar OvOtoQAQ commented on June 15, 2024

I add
sys.modules.pop('utils') in torch/hub/facebookresearch_dino_main/vision_transformer.py
before from utils import trunc_normal_
it seems alright but I don't know whether it's correct, how did you fix it? please show me if it's possible, all the best:)

from sinnerf.

Ir1d avatar Ir1d commented on June 15, 2024

one way is to rename the utils.py in facebookresearch_dino_main directory

from sinnerf.

OvOtoQAQ avatar OvOtoQAQ commented on June 15, 2024

one way is to rename the utils.py in facebookresearch_dino_main directory

I tried

    sys.path.append('path') 

still cannot import...... maybe it's just supposed to be popped.......
thank you very much for replying to me:)

from sinnerf.

densechen avatar densechen commented on June 15, 2024

Rename utils in this folder.

from sinnerf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.