HeatmapJSLossο
- class lightning_pose.losses.losses.HeatmapJSLoss[source]ο
Bases:
HeatmapLossJensen-Shannon loss between heatmaps.
Attributes Summary
Methods Summary
compute_loss(targets,Β predictions)Attributes Documentation
- loss_name = 'heatmap_js'ο
Methods Documentation
- compute_loss(targets: Tensor, {'__torchtyping__': True, 'details': ('num_valid_keypoints', 'heatmap_height', 'heatmap_width'), 'cls_name': 'TensorType'}], predictions: Tensor, {'__torchtyping__': True, 'details': ('num_valid_keypoints', 'heatmap_height', 'heatmap_width'), 'cls_name': 'TensorType'}]) Tensor, {'__torchtyping__': True, 'details': ('num_valid_keypoints',), 'cls_name': 'TensorType'}][source]ο
- __init__(data_module: BaseDataModule | UnlabeledDataModule | None = None, log_weight: float = 0.0, **kwargs) None[source]ο
Initialize HeatmapJSLoss.
- Parameters:
data_module β data module providing access to datasets; passed to the parent class.
log_weight β final weight in front of the loss term in the objective function is computed as
1.0 / (2.0 * exp(log_weight)).
- __new__(**kwargs)ο