meijieru / crnn.pytorch

Convolutional recurrent network in pytorch
MIT License
2.38k stars 658 forks source link

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

Open shucunt opened 5 years ago

shucunt commented 5 years ago

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

chenyanghe commented 4 years ago

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

shucunt commented 4 years ago

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

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

blair2020 commented 4 years ago

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

blair2020 commented 4 years ago

我解决了,线程数改为0