Use pytorch photometric loss instead of old self-rolled

This commit is contained in:
CptCaptain 2021-12-13 17:34:53 +01:00
parent f193f8d601
commit a673f807c5

View File

@ -387,7 +387,7 @@ class RectifiedPatternSimilarityLoss(TimedModule):
if std is not None:
mask = mask * std
diff = torchext.photometric_loss(pattern_proj.contiguous(), im.contiguous(), 9, self.loss_type, self.loss_eps)
diff = torchext.photometric_loss_pytorch(pattern_proj.contiguous(), im.contiguous(), 9, self.loss_type, self.loss_eps)
val = (mask * diff).sum() / mask.sum()
return val, pattern_proj