RegressionMSELoss

class lightning_pose.losses.losses.RegressionMSELoss(data_module: BaseDataModule | UnlabeledDataModule | None = None, epsilon: float = 0.0, log_weight: float = 0.0, **kwargs)[source]

Bases: Loss

MSE loss between ground truth and predicted coordinates.

Methods Summary

__call__(keypoints_targ, keypoints_pred[, stage])

Call self as a function.

compute_loss(targets, predictions)

remove_nans(targets, predictions)

Methods Documentation

__call__(keypoints_targ: Tensor[Tensor], keypoints_pred: Tensor[Tensor], stage: Literal['train', 'val', 'test'] | None = None, **kwargs) Tuple[Tensor[Tensor], List[dict]][source]

Call self as a function.

compute_loss(targets: Tensor[Tensor], predictions: Tensor[Tensor]) Tensor[Tensor][source]
remove_nans(targets: Tensor[Tensor], predictions: Tensor[Tensor]) Tuple[Tensor[Tensor], Tensor[Tensor]][source]