Losses tl.losses

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.

CosineMSELoss([max_weight, name, reduction])

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

CosineMSELogLoss([max_weight, name, ...])

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

PoissonLoss([log_transform, eps, reduction, ...])

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

PoissonMultinomialLoss([total_weight, eps, ...])

Poisson decomposition with multinomial specificity term for aggregated counts.