Cross entropy and BCELoss give average over all pixels. How can I compute a loss having same shape as the class prediction matrix where each pixel has loss value.
I want to get a loss output of shape (H,W) where each pixel has loss for thst particular pixel.