regularization

Regularization loss functions for the Lightning IR framework.

This module contains loss functions that apply regularization to embeddings to prevent overfitting and improve generalization.

Classes

FLOPSRegularization([query_weight, doc_weight])

FLOPS Regularization loss function for query and document embeddings.

L1Regularization([query_weight, doc_weight])

L1 Regularization loss function for query and document embeddings.

L2Regularization([query_weight, doc_weight])

L2 Regularization loss function for query and document embeddings.