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 β final weight in front of the loss term in the objective function is computed as
1.0 / (2.0 * exp(log_weight)).
- __new__(**kwargs)ο