nemos.regularizer.Regularizer.penalized_loss#

abstractmethod Regularizer.penalized_loss(loss, regularizer_strength)[source]#

Abstract method to penalize loss functions.

Parameters:
  • loss (Callable) – Callable loss function.

  • regularizer_strength (float) – Float the indicates the regularization strength.

Return type:

Callable

Returns:

A modified version of the loss function including any relevant penalization based on the regularizer type.