Ssd.pytorch: StopIteration

Created on 2 Aug 2019  路  5Comments  路  Source: amdegroot/ssd.pytorch

image

Why?I don't know how to deal with it?Please help me

Most helpful comment

in train.py change line:
images, targets = next(batch_iterator)
to:
try:
images, targets = next(batch_iterator)
except StopIteration:
batch_iterator=iter(data_loader)
images, targets = next(batch_iterator)

All 5 comments

I met same problem.

in train.py change line:
images, targets = next(batch_iterator)
to:
try:
images, targets = next(batch_iterator)
except StopIteration:
batch_iterator=iter(data_loader)
images, targets = next(batch_iterator)

I used enumerate to iterate data_loader and solved this problem.

I used enumerate to iterate data_loader and solved this problem.
Dear friend锛歝an you copy your code about this part?

I met same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lmingyin picture lmingyin  路  5Comments

mikejmills picture mikejmills  路  6Comments

ohnabe picture ohnabe  路  6Comments

squirrel16 picture squirrel16  路  5Comments

xinyu1214 picture xinyu1214  路  5Comments