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

accuracy is 0 #26

Open
liuyiyiyiyi opened this issue Dec 22, 2018 · 5 comments
Open

accuracy is 0 #26

liuyiyiyiyi opened this issue Dec 22, 2018 · 5 comments

Comments

@liuyiyiyiyi
Copy link

我生成了5w的样本,4w做训练,1w做测试,accuracy为0,可能的原因是什么呢,还有就是你的accuracy和ctc loss分别是什么呢

@liuyiyiyiyi
Copy link
Author

I1222 07:07:39.157032 26829 sgd_solver.cpp:105] Iteration 19500, lr = 1e-05
I1222 07:11:35.553428 26829 solver.cpp:331] Iteration 19600, Testing net (#0)
I1222 07:12:46.248581 26829 solver.cpp:398] Test net output #0: accuracy = 8e-05
I1222 07:12:46.248845 26829 solver.cpp:398] Test net output #1: ctc_loss = 11.8095 (* 1 = 11.8095 loss)
I1222 07:12:48.490643 26829 solver.cpp:219] Iteration 19600 (0.323269 iter/s, 309.34s/100 iters), loss = -nan
I1222 07:12:48.490779 26829 solver.cpp:238] Train net output #0: accuracy = 0
I1222 07:12:48.490815 26829 solver.cpp:238] Train net output #1: ctc_loss = 11.9346 (* 1 = 11.9346 loss)
I1222 07:12:48.490839 26829 sgd_solver.cpp:105] Iteration 19600, lr = 1e-05
I1222 07:16:47.911034 26829 solver.cpp:219] Iteration 19700 (0.417668 iter/s, 239.425s/100 iters), loss = -nan
I1222 07:16:47.911434 26829 solver.cpp:238] Train net output #0: accuracy = 0
I1222 07:16:47.911478 26829 solver.cpp:238] Train net output #1: ctc_loss = 11.7821 (* 1 = 11.7821 loss)
I1222 07:16:47.911489 26829 sgd_solver.cpp:105] Iteration 19700, lr = 1e-05
I1222 07:20:46.812930 26829 solver.cpp:331] Iteration 19800, Testing net (#0)
I1222 07:21:54.835827 26829 solver.cpp:398] Test net output #0: accuracy = 0.00012
I1222 07:21:54.839115 26829 solver.cpp:398] Test net output #1: ctc_loss = 11.8588 (* 1 = 11.8588 loss)
I1222 07:21:57.172338 26829 solver.cpp:219] Iteration 19800 (0.323346 iter/s, 309.266s/100 iters), loss = -nan
I1222 07:21:57.172468 26829 solver.cpp:238] Train net output #0: accuracy = 0.002
I1222 07:21:57.172489 26829 solver.cpp:238] Train net output #1: ctc_loss = 11.8786 (* 1 = 11.8786 loss)
I1222 07:21:57.172499 26829 sgd_solver.cpp:105] Iteration 19800, lr = 1e-05
I1222 07:25:57.027230 26829 solver.cpp:219] Iteration 19900 (0.416913 iter/s, 239.858s/100 iters), loss = -nan
I1222 07:25:57.027503 26829 solver.cpp:238] Train net output #0: accuracy = 0
I1222 07:25:57.027542 26829 solver.cpp:238] Train net output #1: ctc_loss = 11.7884 (* 1 = 11.7884 loss)
I1222 07:25:57.027555 26829 sgd_solver.cpp:105] Iteration 19900, lr = 1e-05
I1222 07:29:54.699640 26829 solver.cpp:448] Snapshotting to binary proto file ./examples/crnn/model/crnn_captcha_iter_20000.caffemodel
I1222 07:29:54.869462 26829 sgd_solver.cpp:273] Snapshotting solver state to binary proto file ./examples/crnn/model/crnn_captcha_iter_20000.solverstate
I1222 07:29:56.457839 26829 solver.cpp:311] Iteration 20000, loss = -nan
I1222 07:29:56.457885 26829 solver.cpp:331] Iteration 20000, Testing net (#0)
I1222 07:31:05.673779 26829 solver.cpp:398] Test net output #0: accuracy = 8e-05
I1222 07:31:05.676453 26829 solver.cpp:398] Test net output #1: ctc_loss = 11.8025 (* 1 = 11.8025 loss)

@yalecyu
Copy link
Owner

yalecyu commented Dec 24, 2018

学习率会不会太低?你的Loss没有下降下去?

@liuyiyiyiyi
Copy link
Author

好的,我修改lr试一下

@liuyiyiyiyi
Copy link
Author

你好,accuracy为0.99,但是测试结果均为- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@yalecyu
Copy link
Owner

yalecyu commented Apr 9, 2019

@liuyiyiyiyi 我已经更新了代码,是训练和测试数据数据分布不一致造成的。训练归一化了输入

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

2 participants