Module dfdx::losses

source · []
Expand description

Standard loss functions such as mse, mae, cross entropy, and more.

Functions

Cross entropy loss. This will call log_softmax(logits), so make sure logits is not the output from softmax() or log_softmax() already.

Mean absolute error. This is the same as doing (pred - &targ).abs().mean()

Mean Squared Error. This is the same as doing (pred - &targ).square().mean()

Root Mean square error. This is the same as doing (pred - &targ).square().mean().sqrt()