MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / l2_loss

Function l2_loss

utils/loss_utils.py:21–22  ·  view source on GitHub ↗
(network_output, gt)

Source from the content-addressed store, hash-verified

19 return torch.abs((network_output - gt)).mean()
20
21def l2_loss(network_output, gt):
22 return ((network_output - gt) ** 2).mean()
23
24def gaussian(window_size, sigma):
25 gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected