Focal-Loss icon indicating copy to clipboard operation
Focal-Loss copied to clipboard

focal_loss_layer.cpp:43] Check failed: bottom[0]->count() == bottom[1]->count() (8 vs. 4) SIGMOID_CROSS_ENTROPY_LOSS layer inputs must have the same count.

Open 1343464520 opened this issue 5 years ago • 0 comments

hi, @liuyuisanai when i train the model for 2 classification, I have this error. So, I try to change the output num of fc layer from 2 to 1. It can work. But the acc is very low...just about 60%...I use the same focal loss layer as the README. Please help me. The following is the fc layer and focal loss layer: layer { name: "fc1" type: "InnerProduct" bottom: "view_blob1" top: "fc_blob1" inner_product_param { num_output: 2 weight_filler { type: "xavier" } bias_filler { type: "constant" } } } layer { name: "loss_focal" type: "FocalLoss" bottom: "fc_blob1" bottom: "label" top: "loss_focal" loss_weight: 10 loss_param{ normalize: true normalization: FULL } } thank you very much.

1343464520 avatar Dec 12 '19 02:12 1343464520