IFusedReadoutLossLayer<T>
Interfaces · AiDotNet.Interfaces
A readout layer that can compute loss(Forward(input), target) as one fused, differentiable operation without
materialising its output on the autodiff tape - for example a language-model head fused with cross-entropy
(IEngine.FusedLinearCrossEntropyWithLogits), whose output is a [rows, vocabulary] logits tensor.
Local-objective credit rules evaluate the readout once per hidden layer, so the decomposed path keeps one such
tensor (and its softmax intermediates) per layer alive until the backward pass.
Methods
| Method | Summary |
|---|---|
Tensor<T> TryComputeFusedLoss(Tensor<T> input, Tensor<T> target, ILossFunction<T> loss) |
Returns the scalar loss equal to loss.ComputeTapeLoss(Forward(input), target) reduced to a scalar, computed by a fused operation recorded on the current tape, or null when this loss / target combination is not supported (the caller then… |