xiaofengShi / CHINESE-OCR

[python3.6] 运用tf实现自然场景文字检测,keras/pytorch实现ctpn+crnn+ctc实现不定长场景文字OCR识别
2.92k stars 964 forks source link

TypeError: function takes exactly 5 arguments (1 given) #33

Open little2Rabbit opened 6 years ago

little2Rabbit commented 6 years ago

训练时候运行crnn_main.py
Traceback (most recent call last): File "crnn_main.py", line 310, in cost = trainBatch(crnn, criterion, optimizer) File "crnn_main.py", line 257, in trainBatch data = train_iter.next() File "/root/anaconda3/envs/xiaofengshi-train2.7/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 336, in next return self._process_next_batch(batch) File "/root/anaconda3/envs/xiaofengshi-train2.7/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch raise batch.exc_type(batch.exc_msg) TypeError: function takes exactly 5 arguments (1 given)

zhosteven commented 6 years ago

I have meet the same issue.who knows? thanks .

zhosteven commented 6 years ago

one reseaon is that if you use docker ,you need to config workers=0.

songtaoshi commented 5 years ago

why i have to config the workers to be 0?

blair2020 commented 4 years ago

一模一样的错误,请问楼主解决了吗

blair2020 commented 4 years ago

我觉得可能是lmdb,我就改了这个就报这个错误

blair2020 commented 4 years ago

我解决了,线程数改为0

chlg3321 commented 4 years ago

modify num_work=0,it works to me. Thanks