Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to train my custom dataset? #6

Open
Ace-blue opened this issue Jun 13, 2023 · 3 comments
Open

How to train my custom dataset? #6

Ace-blue opened this issue Jun 13, 2023 · 3 comments

Comments

@Ace-blue
Copy link

Dear Author.
When I train with my own dataset, and print
"
Traceback (most recent call last):
File "/home/zzy/Revisiting-Reverse-Distillation/main.py", line 225, in
auroc_sp, auroc_px, aupro_px = train(c, pars)
File "/home/zzy/Revisiting-Reverse-Distillation/main.py", line 58, in train
train_dataloader = torch.utils.data.DataLoader(train_data, batch_size=pars.batch_size, shuffle=True)
File "/home/zzy/.conda/envs/zzyRD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 344, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "/home/zzy/.conda/envs/zzyRD/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 107, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0
"
I'd like to know how to solve this, thx

@Ace-blue
Copy link
Author

I have fixed this bug. The image format in my dataset is "jpg", I changed them to 'png' and the bug is fixed.

@Ace-blue
Copy link
Author

I am wondering if this project will support multi gpus for training?
Thx for your reply

@Ace-blue
Copy link
Author

Dear Author.
Will you provide the Dockerfile for this project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant