Mask in ncc_loss from deepali.losses.functional does not work. the image-loss is already collapses to shape=[c] before masked_loss is called, through the sum(dim=1) calls.