language icon indicating copy to clipboard operation
language copied to clipboard

YES/NO answer

Open paulachocron opened this issue 7 years ago • 1 comments

Hi! I was taking a look at the code and saw that the predictions seem to always output NONE for the yes/no answer part (line 1265 in run_nq.py, "yes_no_answer": "NONE").

This confused me a bit. My plan is to modify the code to obtain this part of the prediction from the answer_type_logits, but I just wanted to be sure this makes sense.

paulachocron avatar Jul 18 '19 07:07 paulachocron

Maybe use these two lines can get proper predictions for "yes/no":

      "answer_type_logits": summary.answer_type_logits.tolist(),
      "answer_type": int(np.argmax(summary.answer_type_logits))

(copied from kaggle competition: https://www.kaggle.com/prokaj/bert-joint-baseline-notebook)

ymcdull avatar Nov 25 '19 21:11 ymcdull