Giter Club home page Giter Club logo

Comments (12)

KaiyangZhou avatar KaiyangZhou commented on July 16, 2024

more details on how you run the code?

from coop.

JoyeMing avatar JoyeMing commented on July 16, 2024

run the code with:bash scripts/coop/main.sh imagenet rn50_ep50 end 16 1 False
and imagenet are configured according to datasets.md

from coop.

KaiyangZhou avatar KaiyangZhou commented on July 16, 2024

you can check the source code here https://github.com/KaiyangZhou/Dassl.pytorch/blob/master/dassl/data/data_manager.py#L38

the error you got, assert len(data_loader) > 0, means the data loader has zero length and hence no minibatches were loaded

it might happen when drop_last=True and batch_size is bigger than the dataset size

anyway, I'd suggest you take a look at your dataset and put some stop points like import pdb; pdb.set_trace() in the data_manager.py

what I'm sure about is you don't need to change any source code of dassl in order to get this CoOp code running

from coop.

JoyeMing avatar JoyeMing commented on July 16, 2024

Thank you for your reply. I rechecked the contents of the Imagenet dataset. There are 1000 files in the train folder that are consistent with the remarks of datasets.md. There is no error. What is the content of the Val folder? I use a 6.7g Val with 50000 pictures.

from coop.

KaiyangZhou avatar KaiyangZhou commented on July 16, 2024

A standard imagenet dataset has a train folder and a val folder. Isn't it?

from coop.

JoyeMing avatar JoyeMing commented on July 16, 2024

Good, thank you. It seems that my Val version is wrong. Thank you for your reply

from coop.

zhaoshitian avatar zhaoshitian commented on July 16, 2024

Good, thank you. It seems that my Val version is wrong. Thank you for your reply

I meet the same problem. Did you fix it now?

from coop.

JoyeMing avatar JoyeMing commented on July 16, 2024

classifying pictures can solve the problem

from coop.

Pefect96 avatar Pefect96 commented on July 16, 2024

classifying pictures can solve the problem

I meet the same problem, but after I classified the val fold, it still does not work.

from coop.

htzhang-code avatar htzhang-code commented on July 16, 2024

classifying pictures can solve the problem

I meet the same problem, but after I classified the val fold, it still does not work.

Did you fix it now?

from coop.

htzhang-code avatar htzhang-code commented on July 16, 2024

classifying pictures can solve the problem

I meet the same problem, but after I classified the val fold, it still does not work.

Did you fix it now?

I solve it. The reason is that the preprocessed.pkl was created, but no information was written. This causes datasets/imagenet.py to not execute correctly.

from coop.

lhrst avatar lhrst commented on July 16, 2024

classifying pictures can solve the problem

I meet the same problem, but after I classified the val fold, it still does not work.

Did you fix it now?

I solve it. The reason is that the preprocessed.pkl was created, but no information was written. This causes datasets/imagenet.py to not execute correctly.

whoa, thanks for solving the problem, this helps a lot!

from coop.

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.