problem in training ssd
Dear weiliu89: I'am new to ssd、and caffe. I tried to train a ssd-model with VOC2007dataset(both trainval、test,convert them to lmdb files), then run ssd_pascal.py to train ,here is the problem: sgd_solver.cpp:106] Iteration 13100,lr = 0.001 math_functions.cpp:250] Check failed: a <= b <0 vs -1.19209e-007> *** Check failure stack trace ***. I think there may be something wrong with my dataset,but i use voc2007 datases、and i don't know how to deal with it. Could you help me? Thank you.
Did you change the batch_sampler?
No,I have never changed the batch_sample parameters(and i compare it to the original ssd_pascal.py files)Should i change it?
i run it again,this time it comes in the place :iteration = iteration. sgd_solver.cpp:106] Iteration 18500,lr = 0.001 math_functions.cpp:250] Check failed: a <= b <0 vs -1.19209e-007> *** Check failure stack trace ***.
What does the failure stack trace back to? Is it an error in this function?
The error is in the "math_functions.cpp"、Line 250,
caffe_rng_uniform(){
.........
CHECK_LE(a, b); //Check failed: a <= b <0 vs -1.19209e-007>
}
But what is the function that calls caffe_rng_uniform?
i can't find which functions calls caffe_rng_uniform exactly, there are some functions calls caffe_rng_uniform . the error suddenly happened, i can't find out which functions calls it at the moment.
Hello, I am running into a similar issue. My callstack is:
- caffe::caffe_rng_uniform<float>
- caffe:: SampleBBox
- caffe:: GenerateBatchSamples
- caffe::AnnotatedDataLayer<float>:: load_batch
- caffe::BasePrefetchingDataLayer<float>:: InternalThreadEntry
@123chengbo 你好,我也遇到了这个问题,请问找到原因了吗?我是在win10下运行的 ssd_pascal.py 用的voc0712 cpu模式
没能解决,我在GPU下训练,我的机子上这个问题出现的频率不算太高(少的话几千iterations、多的话2万iterations),所以我只好把保存模型的间隔设得很小(2000次),一旦断了就再启动一下接着跑,这样勉强也跑了100000iterations。 我还遇到一个问题:windows下的性能感觉 很奇怪 ?SSD_300x300的模型,我在 CPU下测试一张图片耗时3s多、GPU下耗时400多ms,TITAN X的显卡,分辨率500X400多。感觉太费了,但是不知道 怎么 查。 @jianan86
@weiliu89 ,I run SSD on Windows,GPU(I have only one TITAN X),but i found it takes too many times to detect pictures(average 400ms per picture,in the VOC2007 datasets);As it run in CPU mode,it is 3s per picture。 It seems very strange。 have you ever run SSD on windows?Would you give me some advices on how to check it
hello, i also meet this problem.
math_functions.cpp:250] Check failed: a <= b (0 vs. -2.38419e-07)
i find the error occurs here:
SampleBBox(){
...
// Check failed if bbox_width ==1
caffe_rng_uniform(1, 0.f, 1 - bbox_width, &w_off);
//Check failed if bbox_height ==1
caffe_rng_uniform(1, 0.f, 1 - bbox_height, &h_off);
...
}
this is due to float precision issue.
if bbox_height == 1, 1- bbox_height will be a very small number (not 0) ,may be 1.19209e-007
so , we should do some check before pass it to caffe_rng_uniform :
float b = 1 - bbox_width;
if (abs(b) < 1e-7) b = 0.0f;
caffe_rng_uniform(1, 0.f, b, &w_off);
float have 7 digits of decimal precision , so we compare b with 1e-7.
@dtmoodie hi, how do you solve this problem? I have the same failure stack trace as you.
Hello,
I know the problem was solved, possibly by itself? I don't remember doing anything. It may have been an updated version that works.
@CrazySssst Hi, have you solved the problem by this way? my stack trace is: Check failed: a <= b (0 vs. -1.19209e-07). I tried this method but still report the same problem, need any other operation?
@frankzhan1992 yes, it works for me. i think you should find where the problem is ( which lines )
I met the same problem,I had changed the ssd_pascal.py to solve #Evaluate on whole test set num_test_image=***(your test images) test_abtch_size=1