Predicting answers using DistilBertForQuestionAnswering
I have fine-tuned DistilBertForQuestionAnswering model using custom data. And I saved that model in colab. I can load the model as well.I need to know how I can use that loaded model to input a question and get a answer(prediction).
2021-01-22T07:13:03Z
You can find this info in thedocs. Always nice to check docs before asking here
2021-01-22T14:06:58Z
I tried the code in docs. But it gives me a error.Screenshot (217)1255×441 28.4 KBRuntimeError: Input, output and indices must be on the current device
2021-01-22T14:37:49Z
I solved that issue by putting inputs.to(device)It ran fine for one time. But then it gives the error “RuntimeError: CUDA error: device-side assert triggered”. And it is pointing to where I put “inputs.to(device)”.