MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / compute_loss_l2

Function compute_loss_l2

losses/losses.py:10–13  ·  view source on GitHub ↗
(gt_hair_strands, pred_hair_strands)

Source from the content-addressed store, hash-verified

8
9
10def compute_loss_l2(gt_hair_strands, pred_hair_strands):
11 loss_l2 = ((pred_hair_strands - gt_hair_strands) ** 2).mean()
12
13 return loss_l2
14
15def compute_loss_l1(gt_hair_strands, pred_hair_strands):
16 loss_l1 = torch.nn.functional.l1_loss(pred_hair_strands, gt_hair_strands).mean()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected