You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,can you help me? Thank you very much.
Traceback (most recent call last):
File "main.py", line 580, in
main()
File "main.py", line 571, in main
trainer.train()
File "main.py", line 84, in train
for iteration, batch in enumerate(self.data_loader'train'):
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torchnet/dataset/listdataset.py", line 54, in getitem
return self.load(self.list[idx])
File "/home/wuchenxi/Desktop/DPGN-master/dataloader.py", line 285, in load_function
support_data, support_label, query_data, query_label = self.get_task_batch()
File "/home/wuchenxi/Desktop/DPGN-master/dataloader.py", line 259, in get_task_batch
task_class_list = random.sample(self.full_class_list, self.num_ways)
File "/usr/local/python3.7.5/lib/python3.7/random.py", line 321, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative
The text was updated successfully, but these errors were encountered:
hi, successhaha
The log says "ValueError: Sample larger than population or is negative". Please check the value of self.full_class_list and self.num_ways in the task_class_list = random.sample(self.full_class_list, self.num_ways) .
hi,can you help me? Thank you very much.
Traceback (most recent call last):
File "main.py", line 580, in
main()
File "main.py", line 571, in main
trainer.train()
File "main.py", line 84, in train
for iteration, batch in enumerate(self.data_loader'train'):
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wuchenxi/Desktop/DPGN-master/venv/lib/python3.7/site-packages/torchnet/dataset/listdataset.py", line 54, in getitem
return self.load(self.list[idx])
File "/home/wuchenxi/Desktop/DPGN-master/dataloader.py", line 285, in load_function
support_data, support_label, query_data, query_label = self.get_task_batch()
File "/home/wuchenxi/Desktop/DPGN-master/dataloader.py", line 259, in get_task_batch
task_class_list = random.sample(self.full_class_list, self.num_ways)
File "/usr/local/python3.7.5/lib/python3.7/random.py", line 321, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative
The text was updated successfully, but these errors were encountered: