(gt_hair_strands, pred_hair_strands)
| 8 | |
| 9 | |
| 10 | def 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 | |
| 15 | def compute_loss_l1(gt_hair_strands, pred_hair_strands): |
| 16 | loss_l1 = torch.nn.functional.l1_loss(pred_hair_strands, gt_hair_strands).mean() |
nothing calls this directly
no outgoing calls
no test coverage detected