Loss
- class lightning_pose.losses.losses.Loss[source]
Bases:
objectParent class for all losses.
Attributes Summary
Methods Summary
__call__(*args, **kwargs)Call self as a function.
compute_loss(**kwargs)log_loss(loss, stage)rectify_epsilon(loss)reduce_loss(loss[, method])remove_nans(**kwargs)Attributes Documentation
- weight
Methods Documentation
- reduce_loss(loss: Tensor, method: str = 'mean') Tensor, {'__torchtyping__': True, 'details': ((),), 'cls_name': 'TensorType'}][source]
- __init__(data_module: BaseDataModule | UnlabeledDataModule | None = None, epsilon: float | list[float] = 0.0, log_weight: float = 0.0, **kwargs) None[source]
- Parameters:
data_module – give losses access to data for computing data-specific loss params
epsilon – loss values below epsilon will be zeroed out
log_weight – natural log of the weight in front of the loss term in the final objective function
- __new__(**kwargs)