| ggml_cross_entropy_loss | R Documentation |
Creates a graph node computing the cross-entropy loss between logits
a and labels b. The op applies its own softmax, so a
must be logits, not probabilities.
ggml_cross_entropy_loss(ctx, a, b)
ctx |
GGML context |
a |
Logits |
b |
Labels, same shape as |
Differentiable: the backward pass is wired into the graph, so this can be used as a training loss in a hand-built graph.
A scalar tensor holding the loss
ggml_cross_entropy_loss_back
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.