Different loss functions for the Temporal Model.
def mpjpe(predicted, target):
"""
Mean per-joint position error (i.e mean Euclidean distance),
often referred to as "Protocol #1" in many papers.
"""
assert predicted.shape == target.shape
return torch.mean(torch.norm(predicted - target, dim=len(target.shape)-1))