Open 447428054 opened 3 years ago
我自己写了个inference函数,不知道是否有帮到你~ https://github.com/HsiaYu/mrc-for-flat-nested-ner/blob/master/inference.py
Is there an update about how to do inference? the link you shared is not reachable. Either it is a private repo or the link is not correct.
你好,请问你有预测代码吗
Hi~ Thanks for asking.
We update the codebase and code for inference using the trained MRC-NER model can be found in https://github.com/ShannonAI/mrc-for-flat-nested-ner/blob/master/inference.py
@YuxianMeng @littlesulley需要得到预测的结果,是改写trainer里面的test函数嘛? 之后报个错 result = trainer.test(model=model, test_dataloaders=model.test_dataloader()) print(result)
ValueError:
Dataloader
returned 0 length. Please make sure that your Dataloader at least returns 1 batch