[Caffe]:關於*** Aborted at 1479432790 (unix time) try "date -d @1479432790" 錯誤的另一種原因


問題:設置solver.prototxt時,lr_policy:"step",運行時出現下面問題

*** Aborted at 1479432790 (unix time) try "date -d @1479432790" if you are using GNU date ***
PC: @     0x7fe47645db63 caffe::SGDSolver<>::GetLearningRate()
*** SIGFPE (@0x7fe47645db63) received by PID 13998 (TID 0x7fe476dca780) from PID 1984289635; stack trace: ***
    @     0x7fe47582c2f0 (unknown)
    @     0x7fe47645db63 caffe::SGDSolver<>::GetLearningRate()
    @     0x7fe47645dd72 caffe::SGDSolver<>::ApplyUpdate()
    @     0x7fe47646949f caffe::Solver<>::Step()
    @     0x7fe47646981f caffe::Solver<>::Solve()
    @           0x407471 train()
    @           0x404bcb main
    @     0x7fe475817a40 (unknown)
    @           0x405219 _start
    @                0x0 (unknown)
Floating point exception (core dumped)

原因:未設置stepsize參數

解決:參考下面設置http://www.cnblogs.com/denny402/p/5074049.html

lr_policy可以設置為下面這些值,相應的學習率的計算為:

- fixed:   保持base_lr不變.
- step:    如果設置為step,則還需要設置一個stepsize,  返回 base_lr * gamma ^ (floor(iter / stepsize)),其中iter表示當前的迭代次數
- exp:     返回base_lr * gamma ^ iter, iter為當前迭代次數
- inv:      如果設置為inv,還需要設置一個power, 返回base_lr * (1 + gamma * iter) ^ (- power)
- multistep: 如果設置為multistep,則還需要設置一個stepvalue。這個參數和step很相似,step是均勻等間隔變化,而multistep則是根據                                 stepvalue值變化
- poly:     學習率進行多項式誤差, 返回 base_lr (1 - iter/max_iter) ^ (power)
- sigmoid: 學習率進行sigmod衰減,返回 base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM