NeuralLossFunction
- class lightning_ir.loss.loss.NeuralLossFunction(temperature: float = 1, tol: float = 1e-05, max_iter: int = 50)[source]
Bases:
ListwiseLossFunction
- __init__(temperature: float = 1, tol: float = 1e-05, max_iter: int = 50) None [source]
Methods
__init__
([temperature, tol, max_iter])compute_loss
(output, batch)get_sorted_targets
(scores, targets)neural_sort
(scores)process_scores
(output)process_targets
(scores, batch)sinkhorn_scaling
(mat)