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

Function l1_loss

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

Source from the content-addressed store, hash-verified

16from torchmetrics import MultiScaleStructuralSimilarityIndexMeasure
17
18def l1_loss(network_output, gt):
19 return torch.abs((network_output - gt)).mean()
20
21def l2_loss(network_output, gt):
22 return ((network_output - gt) ** 2).mean()

Callers 2

trainingFunction · 0.90
training_reportFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected