(self, pred, real)
| 331 | super(SIMSELoss, self).__init__() |
| 332 | |
| 333 | def forward(self, pred, real): |
| 334 | diffs = real - pred |
| 335 | n = torch.numel(diffs.data) |
| 336 | mse = torch.sum(diffs.pow(2)) / n |
| 337 | simse = torch.sum(diffs).pow(2) / (n ** 2) |
| 338 | return mse - simse |
| 339 | |
| 340 | class GradRejust(torch.autograd.Function): |
| 341 | @staticmethod |
nothing calls this directly
no outgoing calls
no test coverage detected