crnn.pytorch icon indicating copy to clipboard operation
crnn.pytorch copied to clipboard

assert index <= len(self), 'index range error' AssertionError: index range error

Open shucunt opened this issue 5 years ago • 4 comments

python 2.7 pytorch0.4

Traceback (most recent call last): File "train.py", line 217, in cost = trainBatch(crnn, criterion, optimizer) File "train.py", line 191, in trainBatch data = train_iter.next() File "lll/venv/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 264, in next batch = self.collate_fn([self.dataset[i] for i in indices]) File "nnn/crnn.pytorch/dataset.py", line 112, in getitem return self[index + 1] File "nnn/crnn.pytorch/dataset.py", line 75, in getitem assert index <= len(self), 'index range error' AssertionError: index range error

shucunt avatar May 09 '19 07:05 shucunt

请问你这个问题解决了吗?我也遇到了这个问题

chenyanghe avatar Dec 23 '19 03:12 chenyanghe

请问你这个问题解决了吗?我也遇到了这个问题

没有解决,后来就没有再搞这个了

shucunt avatar Dec 24 '19 09:12 shucunt

一模一样的错误,请问楼主解决了吗,我觉得可能是lmdb,我就改了这个就报这个错误

blair2020 avatar Sep 09 '20 01:09 blair2020

我解决了,线程数改为0

blair2020 avatar Sep 09 '20 03:09 blair2020