FocusOnDepth icon indicating copy to clipboard operation
FocusOnDepth copied to clipboard

Question about gradient loss

Open VincentItaliano opened this issue 1 year ago • 0 comments

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) ?

VincentItaliano avatar Feb 23 '24 15:02 VincentItaliano