zimenglan-sysu-512 / Focal-Loss

loss layer of implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check failed: outer_num_ * inner_num_ == bottom[1]->count() (4 vs. 1) ERROR!

lfdeep opened this issue · comments

commented

Hello, I changed softmaxloss to focalloss in the fpn network, but the following error occurred:
I0621 08:12:50.082605 11689 focal_loss_layer.cpp:48] alpha: 0.25
I0621 08:12:50.082636 11689 focal_loss_layer.cpp:49] beta: 1
I0621 08:12:50.082640 11689 focal_loss_layer.cpp:50] gamma: 2
I0621 08:12:50.082643 11689 focal_loss_layer.cpp:51] type: 0
F0621 08:12:50.082659 11689 focal_loss_layer.cpp:69] Check failed: outer_num_ * inner_num_ == bottom[1]->count() (4 vs. 1) Number of labels must match number of predictions; e.g., if softmax axis == 1 and prediction shape is (N, C, H, W), label count (number of labels) must be NHW, with integer values in {0, 1, ..., C-1}.

Idon't know how to solve it