
Why?I don't know how to deal with it?Please help me
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.
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)