Skip to content
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

不收敛,loss下降到15左右就震荡不动了 #237

Open
mengpengfei opened this issue Dec 23, 2020 · 3 comments
Open

不收敛,loss下降到15左右就震荡不动了 #237

mengpengfei opened this issue Dec 23, 2020 · 3 comments

Comments

@mengpengfei
Copy link

自己训练模型不收敛怎么回事啊, loss从90多下降到15左右时,一直在15附近徘徊,识别率为0

@mengpengfei
Copy link
Author

是训练时间太短导致,开始时很快,后面非常慢,比用caffe收敛速度要慢不少,两个数量级了

@Zhang-O
Copy link

Zhang-O commented Jan 14, 2021

My training loss was around 2000 at the beginning , then reduced to 4 gradually after 1 epoch.

@LW-CVer
Copy link

LW-CVer commented Jan 16, 2021

image = torch.FloatTensor(opt.batchSize, 3, opt.imgH, opt.imgH)
text = torch.IntTensor(opt.batchSize * 5)
第一行,3应该改成1,因为train.py里面初始化模型用的1通道,然后第二个opt.imgH应该改为opt.imgW,然后text我觉得应该要大于你的序列长度才可以,我改为opt.batchSize * 10z,最后使用的是adadelta,初始学习率调整到0.1,就能迅速收敛,如果使用默认学习率直接陷入局部最优,跳不出来,loss一直为17左右

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants