MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / forward

Method forward

PATH/core/utils.py:333–338  ·  view source on GitHub ↗
(self, pred, real)

Source from the content-addressed store, hash-verified

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
340class GradRejust(torch.autograd.Function):
341 @staticmethod

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected