Skip to content

How do I set the distance function the modl should use? #199

Answered by rasdani
PhilipMay asked this question in Q&A
Discussion options

You must be logged in to vote

I found multiple locations, where one can set a similarity function. The one at the very bottom I tried out myself, but could not tell if it had any effect, since I was using normalized embeddings anyway.

You can choose the similarity function when initialising the Evaluator. The two in question would be RetrievalEvaluator.py and RerankingEvaluator.py.

score_functions: List[Callable[[torch.Tensor, torch.Tensor], torch.Tensor]] = {

Or the one I tried was in evaluate() of AbsTaskRetrieval.py

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by KennethEnevoldsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants