3Dunet_abdomen_cascade icon indicating copy to clipboard operation
3Dunet_abdomen_cascade copied to clipboard

about softmax_loss layer

Open qinhaifangpku opened this issue 7 years ago • 3 comments

hi~ It is very appreciated that you release this code. It is very helpful for my research. but I have the question about the softmax_loss layer. in some situation that the batch data has just C class which C < K, K is the total class in the networks. and it will LOG error that: "sum of pixel-wise loss weights is zero" Do you have ever happened to this? Is it matter with the results?

thank you very much in advance!

qinhaifangpku avatar Feb 05 '18 08:02 qinhaifangpku

Yes, it happens if all voxels within the patch have a zero weight or are labelled with the ignore value. If you use the weight image, they should be non-zero somewhere.

holgerroth avatar Feb 08 '18 01:02 holgerroth

but if we have two class to classified, the patches for training sometimes just have class 1, so the weights of class 2 will be zero. because the samples are imbalance, it is not possible to make all the patches for training contain two class label at the same time.

qinhaifangpku avatar Mar 01 '18 10:03 qinhaifangpku

@qinhaifangpku Could you solve the sum of pixel-wise loss weights is zero issue? If yes, could you please share it here? The loss that i am getting in some points becomes negative, which I think this warning should be the reason. Your help is appreciated.

sara-eb avatar Aug 11 '18 06:08 sara-eb