Giter Club home page Giter Club logo

Comments (10)

dmburd avatar dmburd commented on August 17, 2024

Please checkout the commit a1179c8. Then edit the script train.py: find the line for sample in self.train_loader: (should be line 220) and insert 5 lines right above that.

            print(f"train_loader length = {len(self.train_loader)}")
            print("print_dbg_info_dataloader() call:")
            print_dbg_info_dataloader(self.train_loader)
            print("print_dbg_info_dataloader() exited")
            e()
            for sample in self.train_loader:
                gt_cls0_label, gt_cls1_label, gt_cls2_label = sample['labels_gt']
                ...

Then launch the script by

python train.py dataset=ShanghaiTech_part_B > train_loader.txt 2>&1

and send me the generated file train_loader.txt.

from s-dcnet.

darissa avatar darissa commented on August 17, 2024

As attached.

train_loader.txt

from s-dcnet.

dmburd avatar dmburd commented on August 17, 2024

I wonder if the issue is specific to your windows environment. Do you have a Linux OS installation / Linux machine at hand (maybe a virtual machine)? Could you install the required packages simply by pip3 install <package_name>, download the data, git clone my repo and run my scripts? (Python 3.6 or above is required.)
I have successfully run the scripts on a few Linux servers (have not encountered any issues).

from s-dcnet.

darissa avatar darissa commented on August 17, 2024

Yeah that's why, I don't have linux machine. Yes I did install using pip install package name with python 3.6. Thank you for helping me out.

from s-dcnet.

dmburd avatar dmburd commented on August 17, 2024

@darissa Please discard all changes and checkout the commit a53b52d. Then open the script train.py, find all occurrences of num_workers=4 and replace them by num_workers=0 (there are 3 occurrences). Launch the script again:

python train.py dataset=ShanghaiTech_part_B

from s-dcnet.

darissa avatar darissa commented on August 17, 2024

Thanks a lot. I able to run train.py (following you latest instruction), now using virtual ubuntu. I'll report to you if any bug or error happen. Thanks you.

from s-dcnet.

dmburd avatar dmburd commented on August 17, 2024

OK.
After initializing num_workers=0, the script should work on Windows, too (I hope).
(The issue was likely related to this one: https://discuss.pytorch.org/t/dataloader-multiprocessing-error-cant-pickle-odict-keys-objects-when-num-workers-0/43951)

from s-dcnet.

darissa avatar darissa commented on August 17, 2024

I tried on Windows, using epochs=3. No error found but the epoch stays 0/3 and then stop without displaying an error. Also, no expected output, only event file and log file.

from s-dcnet.

dmburd avatar dmburd commented on August 17, 2024

What is the hardware you are trying to train on? (When you tried on Windows)

from s-dcnet.

darissa avatar darissa commented on August 17, 2024

I am using GPU GeForce RTX 2070.

from s-dcnet.

Related Issues (14)

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.