Hello everyone,
I am currently doing a deep learning research project and have a question regarding use of loss function. Basically, for my loss function I am using Weighted cross entropy + Soft dice loss functions but recently I came across with a mean IOU loss which works, but the problem is that it purposely return negative loss. First, it seemed odd to me that it returns -loss, so i changed the function to return 1-loss, but it performed worse so I believe the negative loss is correct approach. This means though that my final loss will be sum of positive, positive and negative values which seem to me very odd and don’t really make sense but surprisingly working not badly.
Hence, during training, my loss values go below 0 as the training continues. My current guess is that it is working fine because the optimization of loss function is to reduce the gradient of loss to zero not the loss itself.
My question is, is it okay to use combination of positive and negative loss functions as what matters is just a gradient of my final loss function?
I used the following approach for IOU loss: How to implement soft-IoU loss? 8
Thank you and I look forward to hearing from someone to answer this question soon!