Loss Functions#

cross_entropy(logits, targets[, axis, reduction])

Computes the cross entropy loss between logits and targets.

binary_cross_entropy(inputs, targets[, ...])

Computes the binary cross entropy loss between inputs and targets.

l1_loss(predictions, targets[, reduction])

Computes the L1 loss between predictions and targets.

mse_loss(predictions, targets[, reduction])

Computes the mean squared error loss between predictions and targets.

nll_loss(inputs, targets[, axis, reduction])

Computes the negative log likelihood loss between inputs and targets.

kl_div_loss(inputs, targets[, axis, reduction])

Computes the Kullback-Leibler divergence loss between targets and the inputs.