I’m working on a semantic segmentation project.
I can get the loss using this (simplified):
loss = nn.BCELoss(predicted_weights, gt_weights)
But I want to get the loss per pixel. I want to know how much loss each pixel contributed to the loss, and change the weights between them before I’m doing the backward propagation.
Thanks