caffe icon indicating copy to clipboard operation
caffe copied to clipboard

why accuracy always 0

Open liuliuqiu opened this issue 10 years ago • 4 comments

I'm doing the two classification, the last innerproduct num_output=2,use softmax as loss,but the accuracy always 0! who can hep me !

liuliuqiu avatar Apr 27 '16 11:04 liuliuqiu

If the labels are zeros and ones, the num_output should be 1 as the label is one dimensional.

kevin-li avatar Apr 27 '16 12:04 kevin-li

My label is two and three,then the num_output should be what?

liuliuqiu avatar Apr 27 '16 13:04 liuliuqiu

Still 2. Just change your labels to 0 and 1. You can simply map the output of network to whatever label you want as long as they are distinct.

kevin-li avatar Apr 27 '16 14:04 kevin-li

From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:

Please do not post usage, installation, or modeling questions, or other requests for help to Issues. Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

seanbell avatar Apr 27 '16 14:04 seanbell