tl.losses

tl.losses#

Custom tf.Keras.losses.Loss functions for specific use cases.

Supply these (or your own) to a tl.TaskConfig to be able to use them for training.

Classes

CosineMSELogLoss

Custom loss function combining logarithmic transformation, cosine similarity, and mean squared error (MSE).

CosineMSELoss

Custom loss function that combines cosine similarity and mean squared error (MSE).

GiniLoss

Custom loss that varies between MAE and MSE depending on the gini score of the ground truth.

PoissonKLLoss

Poisson decomposition with Kullback-Leibler specificity term for aggregated counts.

PoissonLoss

Custom Poisson loss for count data with optional log(x + 1) transformation.

PoissonMultinomialLoss

Poisson decomposition with multinomial specificity term for aggregated counts.