emnlp2017-bilstm-cnn-crf icon indicating copy to clipboard operation
emnlp2017-bilstm-cnn-crf copied to clipboard

Use a pre-trained model for evaluating a new test set?

Open Mahmedturk opened this issue 6 years ago • 4 comments

Hi,

How can I use one of the pre-trained models from the 'models' folder to evaluate on a new test set? Just to check the generalization capability of the model? The test set is already in BIO tagging scheme and need not to be splitted and tokenized. Just want to do the predictions and evaluation in terms of F1-score.

Thanks

Mahmedturk avatar Jul 27 '19 10:07 Mahmedturk

I have tried using a pre-trained model and got the following error.

OSError: Unable to open file (unable to open file: name = 'linnaeus-IOB_0.9593_0.8883_2.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

Mahmedturk avatar Jul 27 '19 10:07 Mahmedturk

It appears that the file does not exist. Have you specified the correct path?

Have you tried the Save_and_Load.py: https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf/blob/master/Save_and_Load.py

Does it work?

nreimers avatar Aug 06 '19 09:08 nreimers

Hi,

I have specified the path correctly and the file does exist as i can see it. There are a number of models that i have trained most of them would throw the above error. While few of them work.

Mahmedturk avatar Aug 14 '19 02:08 Mahmedturk

I haven't used save and load py. is it used for transfer learning?

I am only trying to use a pre-trained model for annotating free text for which i don't think i have to use saveandload.py

Mahmedturk avatar Aug 14 '19 02:08 Mahmedturk