3Dunet_abdomen_cascade
3Dunet_abdomen_cascade copied to clipboard
about softmax_loss layer
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!
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.
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 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.