ISequenceLossFunction<T>

Interfaces · AiDotNet.Interfaces

Interface for sequence loss functions that operate on variable-length sequences.

Known implementations: CTCLoss<T>

Methods

Method Summary
T CalculateLoss(Tensor<T> logProbs, int[][] targets, int[] inputLengths, int[] targetLengths) Calculates the loss for sequence data.
Tensor<T> CalculateGradient(Tensor<T> logProbs, int[][] targets, int[] inputLengths, int[] targetLengths) Calculates the gradient of the loss with respect to the inputs.