AstarLight/Lets_OCR

train 数据集时候,未收敛便提前终止了,并且和题主给的训练图片也不太一样,len(train_loader)输出的是7,不知道哪里出错了

Opened this issue · 3 comments

@joeqincai 你好,我的训练的报错是这个,求助一下大佬这是什么原因呢??
[0/20][20/282] Loss: 42.145580
[0/20][40/282] Loss: 19.428555
[0/20][60/282] Loss: 17.523825
[0/20][80/282] Loss: 16.701580
[0/20][100/282] Loss: 16.425825
[0/20][120/282] Loss: 16.065802
[0/20][140/282] Loss: 15.806343
[0/20][160/282] Loss: 15.621722
[0/20][180/282] Loss: 15.718269
[0/20][200/282] Loss: 15.642500
[0/20][220/282] Loss: 15.453972
[0/20][240/282] Loss: 15.550603
[0/20][260/282] Loss: 15.239004
Traceback (most recent call last):
File "train.py", line 166, in
cost = trainBatch(net, criterion, optimizer, train_iter)
File "train.py", line 77, in trainBatch
t, l = converter.encode(cpu_texts)
File "/opt/crnn/lib/convert.py", line 52, in encode
index = self.dict[char]
KeyError: '\ufeff'

@joeqincai 我没有提前按键中止,是运行到这里报错了