Log_softmax always returns 0 for index 0(background)

For a segmentation use case focal loss might help or a pixel-wise weighting of the minority classes.

The large negative values are approx. zero as probabilities and I would assume an Inf somewhere in the computation might have some bad side effects. :wink:

Thanks, Iā€™m glad my posts are helpful. :slight_smile: