Closed Aurora11111 closed 6 years ago
As the problem says,one is for my image is Corrupted,but I don't what it mean,another is my worker? I have try 0,1,4 to set the worker numbers,but it still occur this issue.
try:
img = Image.open(buf).convert('L')
except IOError:
print('Corrupted image for %d' % index)
return self[index + 1]
I solved this by using python2.7 to convert datasets to lmdb format
can you show how to convert ? thank you
@gofortargets reference:https://github.com/Aurora11111/crnn-train-pytorch
when run the crnn_main.py ,it stuck in :
Corrupted image for 655 Corrupted image for 657 Corrupted image for 659 Corrupted image for 661 Corrupted image for 663 Corrupted image for 665 Corrupted image for 667 Corrupted image for 669 Corrupted image for 671 Corrupted image for 673 Corrupted image for 675 Corrupted image for 677 Corrupted image for 679 Corrupted image for 681 Corrupted image for 683 Corrupted image for 685 Process Process-1: Traceback (most recent call last): File "/home/rice/PycharmProjects/crnn.pytorch-master/crnn_main.py", line 199, in
cost = trainBatch(crnn, criterion, optimizer)
File "/home/rice/PycharmProjects/crnn.pytorch-master/crnn_main.py", line 173, in trainBatch
data = train_iter.next()
File "/home/rice/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 275, in next
idx, batch = self._get_batch()
File "/home/rice/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 254, in _get_batch
return self.data_queue.get()
File "/home/rice/anaconda3/envs/tensorflow1/lib/python3.6/queue.py", line 164, in get
self.not_empty.wait()
File "/home/rice/anaconda3/envs/tensorflow1/lib/python3.6/threading.py", line 295, in wait
waiter.acquire()
File "/home/rice/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 175, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 6955) exited unexpectedly with exit code 1.
Process finished with exit code 1
can anyone share solution with me?