ggml_cross_entropy_loss_back: Cross-Entropy Loss Backward (Graph)

View source: R/operations.R

ggml_cross_entropy_loss_backR Documentation

Cross-Entropy Loss Backward (Graph)

Description

Gradient node for ggml_cross_entropy_loss.

Usage

ggml_cross_entropy_loss_back(ctx, a, b, c)

Arguments

ctx

GGML context

a

Upstream gradient

b

Logits from the forward pass

c

Labels from the forward pass

Details

ggml_build_backward_expand() inserts this automatically, so it is rarely needed directly; it is exposed for hand-built backward graphs.

Value

Gradient w.r.t. the logits

See Also

ggml_cross_entropy_loss


ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.