How to use SigmoidCrossEntropyLoss in caffe for bi

2019-07-27 04:53发布

问题:

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

回答1:

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"
 }