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
Sorry, @rm-wu@ga1i13o@gmberton@Enrico-Chiavassa . I want to modify the number of positive samples per round during training, but the following error occurred. How can I solve this problem:
Traceback (most recent call last):
File "train.py", line 153, in <module>
for images, triplets_local_indexes, _ in tqdm(triplets_dl, ncols=100):
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/tqdm/std.py", line 1130, in __iter__
for obj in iterable:
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
data = self._next_data()
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1344, in _next_data
return self._process_data(data)
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1370, in _process_data
data.reraise()
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/_utils.py", line 706, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/qxp/VPR/vpr/datasets_ws.py", line 278, in __getitem__
query_index, best_positive_index, neg_indexes = torch.split(self.triplets_global_indexes[index], (1, 1, self.negs_num_per_query))
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/functional.py", line 196, in split
return tensor.split(split_size_or_sections, dim)
File "/home/qxp/anaconda3/envs/vpr/lib/python3.8/site-packages/torch/_tensor.py", line 917, in split
return torch._VF.split_with_sizes(self, split_size, dim)
RuntimeError: split_with_sizes expects split_sizes to sum exactly to 21 (input tensor's size at dimension 0), but got split_sizes=[1, 1, 10]
The text was updated successfully, but these errors were encountered:
Sorry, @rm-wu @ga1i13o @gmberton @Enrico-Chiavassa . I want to modify the number of positive samples per round during training, but the following error occurred. How can I solve this problem:
The text was updated successfully, but these errors were encountered: