FlagEmbedding
FlagEmbedding copied to clipboard
How can I customize the loss function? It seems that cross-entropy does not push the distance between positive and negative samples far enough.
Currently, we only implement cross-entropy in this repo. If you want to use more loss functions, you need to add the code in modeling.py.