Skip to content

A weird bug #15

Description

@ljx761795750

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

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