Search code examples
deep-learningcaffematcaffe

How to use SigmoidCrossEntropyLoss in caffe for binary class classification?


How to use SigmoidCrossEntropyLoss in caffe for binary class problem? Can you give me a prototxt example?


Solution

  • You need your label input to be either zero or one per training sample. other than that

     layer {
       name: "loss"
       type: "SigmoidCrossEntropyLoss"
       bottom: "predict1d"
       bottom: "label"
       top: "loss"
     }