in_batch

In-batch loss functions for the Lightning IR framework.

This module contains loss functions that operate on batches of data, comparing examples within the same batch for training.

Classes

InBatchCrossEntropy([...])

In-batch cross-entropy loss function for ranking tasks.

ScoreBasedInBatchCrossEntropy(min_target_diff)

In-batch cross-entropy loss function based on scores for ranking tasks.

ScoreBasedInBatchLossFunction(min_target_diff)

Base class for in-batch loss functions that compute in-batch indices based on scores.