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

A weird bug #15

Open
ljx761795750 opened this issue Mar 23, 2022 · 0 comments
Open

A weird bug #15

ljx761795750 opened this issue Mar 23, 2022 · 0 comments

Comments

@ljx761795750
Copy link

Thanks for the work, I ran into a weird bug when reproducing,
What am I doing wrong?

Traceback (most recent call last):
File "C:\Users\Li\PycharmProjects\pythonProject4\MTTR\main.py", line 78, in
run(process_id=0, args=args)
File "C:\Users\Li\PycharmProjects\pythonProject4\MTTR\main.py", line 18, in run
trainer = Trainer(config, process_id, device_id=args.device_ids[process_id], num_processes=args.num_devices)
File "C:\Users\Li\PycharmProjects\pythonProject4\MTTR\trainer.py", line 76, in init
self.data_loader_train = DataLoader(dataset_train, batch_size=config.batch_size, sampler=self.sampler_train,
File "C:\Users\Li.conda\envs\mttr\lib\site-packages\torch\utils\data\dataloader.py", line 277, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "C:\Users\Li.conda\envs\mttr\lib\site-packages\torch\utils\data\sampler.py", line 97, 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

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