Hi all,
I’m working on what is effectively an image segmentation problem. However, the majority of the pixels have a category that of ‘I don’t care’. By this I mean that I don’t want the weights affected one way or the other no matter what category those pixels are sorted into.
The pixels that I actually care about are disjoint and represent only a small percentage of the total pixels in the output.
Is there a way to perform CrossEntropyLoss on those scattered disjoint pixels only, while ignoring all of the other pixels? So far, the only sure-fire method I’ve thought of is to visit each pixel of interest and calculate the loss and then add all of the losses together.
Is there a better way?
Thanks in advance!