fusionlab.nn.losses.combined_total_loss¶
- fusionlab.nn.losses.combined_total_loss(quantiles, anomaly_layer, anomaly_scores)[source]¶
Create a total loss that adds quantile loss + anomaly loss.
Like above, only this top-level is decorated. The returned function is not re-decorated.
- Parameters:
quantiles (
listoffloat) – Quantiles for the quantile loss part.anomaly_layer (
tf.keras.losses.Loss) – A custom Loss or callable implementing anomaly loss.anomaly_scores (
tf.Tensorornp.ndarray) – The anomaly scores needed for the anomaly loss.
- Returns:
A loss function: loss_fn(y_true, y_pred)
- Return type:
callable