peal.training.criterions.mixed_bce_mse_criterion¶
- peal.training.criterions.mixed_bce_mse_criterion(model, y_pred, y_target, latent_code=None)[source]¶
BCE on the discrete outputs plus weighted MSE on the continuous ones.
Output columns before
model.config.data.output_splitare logits of binary attributes and are scored withBCEWithLogitsLoss(pos_weight=model.config.task.mixed_bce_pos_weight); the remaining columns are regression targets scored with MSE and weighted bymodel.config.task.bce_mse_mix.- Returns:
Scalar loss.
- Return type: