Formatting of debug output values
I have this classification task, for which there are total 11 classes with each class assigned a label among these { 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10}. I am training my network to classify a 6x6 patch of 2 channel, my batch is of 10. while my training is successfully running without any errors. While running the training in debug mode i observed caffe is reading labels wrong , for eg. if my label is 2, it's reading something like 2.4 sometimes or sometimes 2.5 any float value i.e. 2.(something) have a look, is this some bug? or there is something wrong, i am using LEVELDB data format
I0110 12:21:19.600045 12515 solver.cpp:264] Iteration 5000, Testing net (#0) I0110 12:21:20.179926 12515 solver.cpp:315] Test net output #0: accuracy = 0.25575 I0110 12:21:20.179973 12515 net.cpp:585] [Forward] Layer ml_task, top blob data data: 26.3472 I0110 12:21:20.179983 12515 net.cpp:585] [Forward] Layer ml_task, top blob label data: 2.7 I0110 12:21:20.180117 12515 net.cpp:585] [Forward] Layer conv1, top blob conv1 data: 41.5314 I0110 12:21:20.180259 12515 net.cpp:585] [Forward] Layer pool1, top blob pool1 data: 16.635 I0110 12:21:20.180387 12515 net.cpp:585] [Forward] Layer ip1, top blob ip1 data: 106.926 I0110 12:21:20.180400 12515 net.cpp:585] [Forward] Layer relu1, top blob rl1 data: 0 I0110 12:21:20.180415 12515 net.cpp:585] [Forward] Layer ip2, top blob ip2 data: 1.05634 I0110 12:21:20.180434 12515 net.cpp:585] [Forward] Layer loss, top blob (automatic) data: 1.96576 I0110 12:21:20.180449 12515 net.cpp:599] [Backward] Layer loss, bottom blob ip2 diff: 0.0156321 I0110 12:21:20.180490 12515 net.cpp:599] [Backward] Layer ip2, bottom blob rl1 diff: 0.0360724 I0110 12:21:20.180502 12515 net.cpp:608] [Backward] Layer ip2, param blob 0 diff: 0 I0110 12:21:20.180512 12515 net.cpp:608] [Backward] Layer ip2, param blob 1 diff: 0.138597 I0110 12:21:20.180527 12515 net.cpp:599] [Backward] Layer relu1, bottom blob ip1 diff: 0 I0110 12:21:20.180855 12515 net.cpp:599] [Backward] Layer ip1, bottom blob pool1 diff: 0 I0110 12:21:20.180896 12515 net.cpp:608] [Backward] Layer ip1, param blob 0 diff: 0 I0110 12:21:20.180934 12515 net.cpp:608] [Backward] Layer ip1, param blob 1 diff: 0 I0110 12:21:20.181015 12515 net.cpp:599] [Backward] Layer pool1, bottom blob conv1 diff: 0 I0110 12:21:20.181128 12515 net.cpp:608] [Backward] Layer conv1, param blob 0 diff: 0 I0110 12:21:20.181139 12515 net.cpp:608] [Backward] Layer conv1, param blob 1 diff: 0 I0110 12:21:20.181150 12515 solver.cpp:209] Iteration 5000, loss = 1.96576 I0110 12:21:20.181166 12515 solver.cpp:445] Iteration 5000, lr = 0.000737788 I0110 12:21:20.181283 12515 net.cpp:623] [Update] Layer conv1, param 0 data: 0.179247; diff: 6.61549e-07 I0110 12:21:20.181298 12515 net.cpp:623] [Update] Layer conv1, param 1 data: 0.00265298; diff: 1.95835e-08 I0110 12:21:20.181368 12515 net.cpp:623] [Update] Layer ip1, param 0 data: 0.0173968; diff: 6.42068e-08 I0110 12:21:20.181493 12515 net.cpp:623] [Update] Layer ip1, param 1 data: 0.000623365; diff: 4.60149e-09 I0110 12:21:20.181507 12515 net.cpp:623] [Update] Layer ip2, param 0 data: 0.0983006; diff: 3.628e-07 I0110 12:21:20.181524 12515 net.cpp:623] [Update] Layer ip2, param 1 data: 1.05634; diff: 0.00138213 I0110 12:21:20.613085 12515 net.cpp:585] [Forward] Layer ml_task, top blob data data: 26.3472 I0110 12:21:20.613136 12515 net.cpp:585] [Forward] Layer ml_task, top blob label data: 1.8 I0110 12:21:20.613284 12515 net.cpp:585] [Forward] Layer conv1, top blob conv1 data: 41.3983 I0110 12:21:20.613407 12515 net.cpp:585] [Forward] Layer pool1, top blob pool1 data: 16.5891 I0110 12:21:20.613559 12515 net.cpp:585] [Forward] Layer ip1, top blob ip1 data: 106.569 I0110 12:21:20.613574 12515 net.cpp:585] [Forward] Layer relu1, top blob rl1 data: 0 I0110 12:21:20.613611 12515 net.cpp:585] [Forward] Layer ip2, top blob ip2 data: 1.07255 I0110 12:21:20.613638 12515 net.cpp:585] [Forward] Layer loss, top blob (automatic) data: 1.46301 I0110 12:21:20.613651 12515 net.cpp:599] [Backward] Layer loss, bottom blob ip2 diff: 0.0139426 I0110 12:21:20.613684 12515 net.cpp:599] [Backward] Layer ip2, bottom blob rl1 diff: 0.00434646 I0110 12:21:20.613697 12515 net.cpp:608] [Backward] Layer ip2, param blob 0 diff: 0 I0110 12:21:20.613709 12515 net.cpp:608] [Backward] Layer ip2, param blob 1 diff: 0.11975 I0110 12:21:20.613726 12515 net.cpp:599] [Backward] Layer relu1, bottom blob ip1 diff: 0 I0110 12:21:20.614073 12515 net.cpp:599] [Backward] Layer ip1, bottom blob pool1 diff: 0 I0110 12:21:20.614111 12515 net.cpp:608] [Backward] Layer ip1, param blob 0 diff: 0 I0110 12:21:20.614123 12515 net.cpp:608] [Backward] Layer ip1, param blob 1 diff: 0 I0110 12:21:20.614181 12515 net.cpp:599] [Backward] Layer pool1, bottom blob conv1 diff: 0 I0110 12:21:20.614277 12515 net.cpp:608] [Backward] Layer conv1, param blob 0 diff: 0 I0110 12:21:20.614289 12515 net.cpp:608] [Backward] Layer conv1, param blob 1 diff: 0 I0110 12:21:20.614315 12515 solver.cpp:209] Iteration 5500, loss = 1.46301 I0110 12:21:20.614330 12515 solver.cpp:445] Iteration 5500, lr = 0.000719865 I0110 12:21:20.614428 12515 net.cpp:623] [Update] Layer conv1, param 0 data: 0.17892; diff: 6.44293e-07 I0110 12:21:20.614442 12515 net.cpp:623] [Update] Layer conv1, param 1 data: 0.00264333; diff: 1.90379e-08 I0110 12:21:20.614500 12515 net.cpp:623] [Update] Layer ip1, param 0 data: 0.0173651; diff: 6.25319e-08 I0110 12:21:20.614616 12515 net.cpp:623] [Update] Layer ip1, param 1 data: 0.000621097; diff: 4.4733e-09 I0110 12:21:20.614630 12515 net.cpp:623] [Update] Layer ip2, param 0 data: 0.0981216; diff: 3.53337e-07 I0110 12:21:20.614646 12515 net.cpp:623] [Update] Layer ip2, param 1 data: 1.07255; diff: 0.0014573 I0110 12:21:21.048666 12515 solver.cpp:264] Iteration 6000, Testing net (#0) I0110 12:21:21.624260 12515 solver.cpp:315] Test net output #0: accuracy = 0.14675 I0110 12:21:21.624310 12515 net.cpp:585] [Forward] Layer ml_task, top blob data data: 26.3472 I0110 12:21:21.624325 12515 net.cpp:585] [Forward] Layer ml_task, top blob label data: 5 I0110 12:21:21.624439 12515 net.cpp:585] [Forward] Layer conv1, top blob conv1 data: 41.4231 I0110 12:21:21.624548 12515 net.cpp:585] [Forward] Layer pool1, top blob pool1 data: 16.4976 I0110 12:21:21.624654 12515 net.cpp:585] [Forward] Layer ip1, top blob ip1 data: 105.307 I0110 12:21:21.624665 12515 net.cpp:585] [Forward] Layer relu1, top blob rl1 data: 0 I0110 12:21:21.624687 12515 net.cpp:585] [Forward] Layer ip2, top blob ip2 data: 1.12986 I0110 12:21:21.624716 12515 net.cpp:585] [Forward] Layer loss, top blob (automatic) data: 1.98465 I0110 12:21:21.624730 12515 net.cpp:599] [Backward] Layer loss, bottom blob ip2 diff: 0.015342 I0110 12:21:21.624766 12515 net.cpp:599] [Backward] Layer ip2, bottom blob rl1 diff: 0.00637092 I0110 12:21:21.624778 12515 net.cpp:608] [Backward] Layer ip2, param blob 0 diff: 0 I0110 12:21:21.624791 12515 net.cpp:608] [Backward] Layer ip2, param blob 1 diff: 0.119131 I0110 12:21:21.624807 12515 net.cpp:599] [Backward] Layer relu1, bottom blob ip1 diff: 0 I0110 12:21:21.625130 12515 net.cpp:599] [Backward] Layer ip1, bottom blob pool1 diff: 0 I0110 12:21:21.625167 12515 net.cpp:608] [Backward] Layer ip1, param blob 0 diff: 0 I0110 12:21:21.625180 12515 net.cpp:608] [Backward] Layer ip1, param blob 1 diff: 0 I0110 12:21:21.625236 12515 net.cpp:599] [Backward] Layer pool1, bottom blob conv1 diff: 0 I0110 12:21:21.625329 12515 net.cpp:608] [Backward] Layer conv1, param blob 0 diff: 0 I0110 12:21:21.625336 12515 net.cpp:608] [Backward] Layer conv1, param blob 1 diff: 0 I0110 12:21:21.625341 12515 solver.cpp:209] Iteration 6000, loss = 1.98465 I0110 12:21:21.625351 12515 solver.cpp:445] Iteration 6000, lr = 0.000702927 I0110 12:21:21.625447 12515 net.cpp:623] [Update] Layer conv1, param 0 data: 0.178602; diff: 6.28006e-07 I0110 12:21:21.625459 12515 net.cpp:623] [Update] Layer conv1, param 1 data: 0.00263394; diff: 1.85236e-08 I0110 12:21:21.625507 12515 net.cpp:623] [Update] Layer ip1, param 0 data: 0.0173342; diff: 6.09511e-08 I0110 12:21:21.625623 12515 net.cpp:623] [Update] Layer ip1, param 1 data: 0.00061889; diff: 4.35246e-09 I0110 12:21:21.625634 12515 net.cpp:623] [Update] Layer ip2, param 0 data: 0.0979471; diff: 3.44404e-07 I0110 12:21:21.625641 12515 net.cpp:623] [Update] Layer ip2, param 1 data: 1.12986; diff: 0.00156366 I0110 12:21:22.061580 12515 net.cpp:585] [Forward] Layer ml_task, top blob data data: 26.3472 I0110 12:21:22.061627 12515 net.cpp:585] [Forward] Layer ml_task, top blob label data: 1.8 I0110 12:21:22.061769 12515 net.cpp:585] [Forward] Layer conv1, top blob conv1 data: 41.2746 I0110 12:21:22.061897 12515 net.cpp:585] [Forward] Layer pool1, top blob pool1 data: 16.4696 I0110 12:21:22.062036 12515 net.cpp:585] [Forward] Layer ip1, top blob ip1 data: 105.217
The labels are fine -- it's just how the debugging output works https://github.com/BVLC/caffe/blob/dev/src/caffe/net.cpp#L580-L590. It prints the mean absolute deviation of the blob and since the label is an int it's being printed as a float but don't worry about it.