Files
audio-driven-face-animation/src/loss/pfld_loss.py
T
2022-06-09 16:31:36 +08:00

13 lines
266 B
Python

import torch
import torch.nn as nn
from .utils import weighted_loss
@weighted_loss
def pfld_loss(pred, target, euler_pt, euler_gt, attribute_gt):
"""PFLD loss.
Args:
pred (torch.Tensor): The prediction landmark. (nbatch, 68*2)
"""