How to train my custom dataset?
Opened this issue · 3 comments
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
I have fixed this bug. The image format in my dataset is "jpg", I changed them to 'png' and the bug is fixed.
I am wondering if this project will support multi gpus for training?
Thx for your reply
Dear Author.
Will you provide the Dockerfile for this project