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

raise StopIteration StopIteration #5

Open
Aruen24 opened this issue Dec 2, 2021 · 0 comments
Open

raise StopIteration StopIteration #5

Aruen24 opened this issue Dec 2, 2021 · 0 comments

Comments

@Aruen24
Copy link

Aruen24 commented Dec 2, 2021

Traceback (most recent call last): File "train.py", line 178, in train() File "train.py", line 134, in train images, targets = next(batch_iterator) File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in next data = self._next_data() File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1058, in _next_data raise StopIteration StopIteration

batch_iterator = iter(data.DataLoader(dataset, batch_size, shuffle=True, num_workers=num_workers,
collate_fn=detection_collate, drop_last=True))
change to
batch_iterator = iter(data.DataLoader(dataset, batch_size, shuffle=True, num_workers=num_workers,
collate_fn=detection_collate))

@Aruen24 Aruen24 changed the title Traceback (most recent call last): File "train.py", line 178, in <module> train() File "train.py", line 134, in train images, targets = next(batch_iterator) File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1058, in _next_data raise StopIteration StopIteration raise StopIteration StopIteration Dec 2, 2021
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