FocusOnDepth
FocusOnDepth copied to clipboard
Question about gradient loss
Hi,
I'm trying to modify the loss by adding a confidence weight for each pixel. I don't understand why do you multiply translated mask:
mask_x = torch.mul(mask[:, :, 1:], mask[:, :, :-1])
grad_x = torch.mul(mask_x, grad_x)
to get the final mask in the gradient loss matching term. Why we can't just truncate the mask to get the right shape like this grad_x = torch.mul(mask[:, :, :-1], grad_x) ?