MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / L2Loss

Class L2Loss

script/feature/misc.py:311–319  ·  view source on GitHub ↗

simple L_2-Loss

Source from the content-addressed store, hash-verified

309 return tensor
310
311class L2Loss(nn.Module):
312 """
313 simple L_2-Loss
314 """
315 def __init__(self):
316 super(L2Loss, self).__init__()
317
318 def forward(self, input, target):
319 return torch.sqrt(torch.mean(torch.abs(input - target).pow(2)))
320
321def PoseLoss(args, pose_, pose, device):
322 loss_func = nn.MSELoss()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected