NormXU / ERNIE-Layout-Pytorch

An unofficial Pytorch implementation of ERNIE-Layout which is originally released through PaddleNLP.
http://arxiv.org/abs/2210.06155
MIT License
96 stars 11 forks source link

Could you make test_ernie_qa runnable? #2

Closed calvinzhan closed 1 year ago

calvinzhan commented 1 year ago

Great work, Norm!

I would like to debug the model logic by running test_ernie_qa, but currently both pretrain_torch_model_or_path and doc_imag_path are mocked.

I can assign pretrain_torch_model_or_path to "Norm/ERNIE-Layout-Pytorch", but miss the image. Could you upload the image, so that we can run the case successfully?

Thanks a lot!

NormXU commented 1 year ago

Thanks for your suggestion. Any image should be fine if you just want to debug test_ernie_qa.py.

This is a pretrained model without fine-tuning on any downstream tasks. So directly loading this model and running test_ernie_qa.py on a specific task will return unsatisfactory results. You can refer to this script and adapt it to your own dataset.