clinicadl.metrics.config.LossMetricConfig

clinicadl.metrics.config.LossMetricConfig[source]

Special config class to use a loss function as a metric. Useful to compute your training losses on your validation set.

loss_name is the name given to the loss in clinicadl.models.Model.get_loss_functions().

pred_key corresponds to the key of the model output to evaluate in the DataPoint; label_key is the key of the potential label to which the model output must be compared.

Potential postprocessing to apply to the model output before computing the metric can be specified via postprocessing. Accepted transforms are functions that take as input a DataPoint and return a DataPoint, or configuration classes.

parameter loss_name: str = 'loss'
parameter pred_key: str = 'output'
parameter label_key: Optional[str] = 'label'
parameter postprocessing: Union[list[TransformOrConfig], PostprocessingHandler] = []