-
Notifications
You must be signed in to change notification settings - Fork 135
关于crnn训练中出现train loss=nan的问题 #25
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
Comments
我的经验是有这么几个可能的出问题的地方, |
train_wrap_ctc.py,用的是自带的from torch.nn import CTCLoss,这样的话我再去修改下代码,更新下alphabet,谢谢作者大大 |
如果你用的train_wrap_ctc.py这个训练的话就用warp-ctc |
okok
…------------------ 原始邮件 ------------------
发件人: "coura"<[email protected]>;
发送时间: 2020年3月22日(星期天) 下午2:21
收件人: "courao/ocr.pytorch"<[email protected]>;
抄送: "青龙"<[email protected]>; "Author"<[email protected]>;
主题: Re: [courao/ocr.pytorch] 关于crnn训练中出现train loss=nan的问题 (#25)
如果你用的train_wrap_ctc.py这个训练的话就用warp-ctc
如果想用pytorch自带的CTCloss的话,就用train_pytorch_ctc.py这个文件训练
这样的话应该是不会有nan出现的,
虽然两个文件很像,但是应该还是有细微差别的
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
作者大大你好,,就是我在更新完alphabet后出现了这样的错误,不知道是哪里操作出现了错误,,麻烦作者大大啦
…------------------ 原始邮件 ------------------
发件人: "coura"<[email protected]>;
发送时间: 2020年3月22日(星期天) 下午2:21
收件人: "courao/ocr.pytorch"<[email protected]>;
抄送: "青龙"<[email protected]>; "Author"<[email protected]>;
主题: Re: [courao/ocr.pytorch] 关于crnn训练中出现train loss=nan的问题 (#25)
如果你用的train_wrap_ctc.py这个训练的话就用warp-ctc
如果想用pytorch自带的CTCloss的话,就用train_pytorch_ctc.py这个文件训练
这样的话应该是不会有nan出现的,
虽然两个文件很像,但是应该还是有细微差别的
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
你是贴了图吗。好像没看到你贴的内容 |
问题似乎解决了,,麻烦了。。图好像没上传上来 |
加载预训练模型出错是因为alphabet发生了变化,如果要加载的话换回原来的alphabet即可, |
谢谢作者大大答复,我这就去尝试一下 |
嗯这个错误应该是alphabet里面没有包含unicode为32的字符,这个字符应该是空格,按理说自己生成的alphabet应该是会包含这个字符的,如果没有的可以自己手动加一下。。。
…------------------ 原始邮件 ------------------
发件人: "wpc11"<[email protected]>;
发送时间: 2020年3月28日(星期六) 中午11:04
收件人: "courao/ocr.pytorch"<[email protected]>;
抄送: "coura"<[email protected]>; "Comment"<[email protected]>;
主题: Re: [courao/ocr.pytorch] 关于crnn训练中出现train loss=nan的问题 (#25)
好像图没截全,,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
好的好的。thanks啦
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: coura <[email protected]>
发送时间: 2020年3月28日 16:01
收件人: courao/ocr.pytorch <[email protected]>
抄送: wpc11 <[email protected]>, Author <[email protected]>
主题: 回复:[courao/ocr.pytorch] 关于crnn训练中出现train loss=nan的问题 (#25)
嗯这个错误应该是alphabet里面没有包含unicode为32的字符,这个字符应该是空格,按理说自己生成的alphabet应该是会包含这个字符的,如果没有的可以自己手动加一下。。。
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "wpc11"<[email protected]&gt;;
发送时间: 2020年3月28日(星期六) 中午11:04
收件人: "courao/ocr.pytorch"<[email protected]&gt;;
抄送: "coura"<[email protected]&gt;; "Comment"<[email protected]&gt;;
主题: Re: [courao/ocr.pytorch] 关于crnn训练中出现train loss=nan的问题 (#25)
好像图没截全,,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
这个错误的原因是你再训练时用了新的alphabet但是测试时还是旧的,你把测试的也替换一下就可以了 |
好的感谢啦 |
It works smoothly on 3.6m dataset |
我在训练的时候损失为148多,精确度一直为0,这个咋搞呀 |
我又来补充了。 |
请问您是如何准备新的alphabet.pkl 呢? 在keys.py 里, 有这代码, 但是我该如何准备新的 text.txt (在 infofiles 那) import pickle as pkl |
1.我的数据集是这样的(有360w张图片)




2.我的config是这样的
3、运行情况是
烦请作者大大解答一下,感激不尽
The text was updated successfully, but these errors were encountered: