Skip to content

How to train my custom dataset? #6

Description

@Ace-blue

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions