Use pytorch photometric loss instead of old self-rolled

master
CptCaptain 3 years ago
parent f193f8d601
commit a673f807c5
  1. 2
      model/networks.py

@ -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

Loading…
Cancel
Save