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

训练问题 #87

Open
Waynepoo opened this issue May 12, 2020 · 2 comments
Open

训练问题 #87

Waynepoo opened this issue May 12, 2020 · 2 comments

Comments

@Waynepoo
Copy link

你好,我在训练过程中遇到:
Traceback (most recent call last):
File "/mnt/data/ocr/crnn/Lets_OCR-master/recognizer/crnn/lib/dataset.py", line 55, in getitem
img = Image.open(buf).convert('L')
File "/opt/conda/lib/python3.6/site-packages/PIL/Image.py", line 2818, in open
raise IOError("cannot identify image file %r" % (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7fae42db1e08>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 163, in
cost = trainBatch(net, criterion, optimizer, train_iter)
File "train.py", line 70, in trainBatch
data = train_iter.next()
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 346, in next
data = self.dataset_fetcher.fetch(index) # may raise StopIteration
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mnt/data/ocr/crnn/Lets_OCR-master/recognizer/crnn/lib/dataset.py", line 58, in getitem
return self[index + 1]
File "/mnt/data/ocr/crnn/Lets_OCR-master/recognizer/crnn/lib/dataset.py", line 58, in getitem
return self[index + 1]
File "/mnt/data/ocr/crnn/Lets_OCR-master/recognizer/crnn/lib/dataset.py", line 58, in getitem
return self[index + 1]
[Previous line repeated 325 more times]
File "/mnt/data/ocr/crnn/Lets_OCR-master/recognizer/crnn/lib/dataset.py", line 55, in getitem
img = Image.open(buf).convert('L')
File "/opt/conda/lib/python3.6/site-packages/PIL/Image.py", line 2804, in open
im = _open_core(fp, filename, prefix)
File "/opt/conda/lib/python3.6/site-packages/PIL/Image.py", line 2790, in _open_core
im = factory(fp, filename)
File "/opt/conda/lib/python3.6/site-packages/PIL/ImageFile.py", line 106, in init
self._open()
File "/opt/conda/lib/python3.6/site-packages/PIL/IptcImagePlugin.py", line 93, in _open
tag, size = self.field()
File "/opt/conda/lib/python3.6/site-packages/PIL/IptcImagePlugin.py", line 69, in field
tag = i8(s[1]), i8(s[2])
RecursionError: maximum recursion depth exceeded

能帮忙看看吗 ,谢谢

@Yaoxingtian
Copy link

@Waynepoo 您好! 请问您解决这个问题了吗,我也遇到到这个问题了,可以分享一下吗,谢谢!

@Bonnie-gift
Copy link

我也遇到了 求帮助

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

3 participants