Losses#

The rAI-toolbox provides implementations of loss functions that are not already provided by PyTorch (e.g., torch.nn.CrossEntropyLoss).

jensen_shannon_divergence(*probs[, weight])

Computes the Jensen-Shannon divergence [Re09190a32207-1] between n distributions: