Output Score
#7
by
mosama
- opened
I believe the output score is obtained by global max pooling right? Can we have the score normalized between 0 and 1. That would really help a lot.
The score is computed via a linear layer over the last hidden state of CLS. You can use a sigmoid function to normalize the score: https://pytorch.org/docs/stable/generated/torch.sigmoid.html
+1呀,如果没有阈值的话,真的很难确定到底有没有匹配到相关的文档,不然把所有并不相关片段都扔给GPT也不合理。
I'm using
import torch
probabilities = torch.tanh(torch.tensor(scores))
and check if its greater than zero