mlair.model_modules.loss

Collection of different customised loss functions.

Module Contents

Functions

l_p_loss(power: int) → Callable

Calculate the L<p> loss for given power p.

var_loss(y_true, y_pred) → Callable

custom_loss(loss_list, loss_weights=None) → Callable

mlair.model_modules.loss.l_p_loss(power: int) → Callable

Calculate the L<p> loss for given power p.

L1 (p=1) is equal to mean absolute error (MAE), L2 (p=2) is to mean squared error (MSE), …

Parameters

power – set the power of the error calculus

Returns

loss for given power

mlair.model_modules.loss.var_loss(y_true, y_pred) → Callable
mlair.model_modules.loss.custom_loss(loss_list, loss_weights=None) → Callable