(gt_hair_strands, pred_hair_strands)
| 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() |
| 17 | |
| 18 | return loss_l1 |
| 19 | |
| 20 | def compute_loss_dir_dot(gt_hair_strands, pred_hair_strands): |
| 21 | nr_verts_per_strand=256 |