How I design the result score(Or result probability) ,as the example shows ?
Hi there, can you provide some more details (e.g. code)? The model's outputs are logits from which you can compute confidence, and it's not clear to me why finetuning changes that. I.e. after you fine tune the model, you should be able to compute exactly the same outputs.
Hi there, can you provide some more details (e.g. code)? The model's outputs are logits from which you can compute confidence, and it's not clear to me why finetuning changes that. I.e. after you fine tune the model, you should be able to compute exactly the same outputs.
thanks for your reply,I mean,like the example code,the same question,the nlp return the score is 0.9943977,and the right side ,the page return the score is 0.425, which one should I trust?
Deeply, I have a question: the outputs are logits for the begin and end position of the inputs, but how to transform the logits to score(probability)? Use softmax?
for example. I got the outputs logits for the answer start position, and I do softmax for the logits.and got the max probability is 0.6064619. And I do the softmax for the outputs logits for the answer end position. I got the max probability is 0.41881067.should the final probability is (0.6064619 +0.41881067 )/2 = 0.512636285?
Looking forward to your answers. Thanks a lot
I would suggest reading this code, which transforms the outputs from the model into the scores you see in the demo:
I would suggest reading this code, which transforms the outputs from the model into the scores you see in the demo:
Thanks,I see the code and debug carefully, now I know : to be simple ,if the max end logits index bigger than the start logits index, which means find the answer , the final score is just the start.max()*end.max(), They just multiply.
that's really me ,thank you.
Hello, could you share the code, is that this page was closed.
https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/document_question_answering.py#L450
Sorry I'm not sure I follow — the link you pasted is loading for me?