yuzhimanhua / Multi-BioNER

Cross-type Biomedical Named Entity Recognition with Deep Multi-task Learning (Bioinformatics'19)
https://arxiv.org/abs/1801.09851
Apache License 2.0
132 stars 28 forks source link

Prediction Issue #10

Closed myselfsrh closed 4 years ago

myselfsrh commented 4 years ago

Hey, while executing "seq_wc.py" file on newly trained model KeyError (missing keys in state_dict) occured. Though, it is working fine on your pre-trained model.

Screenshot from 2019-12-05 10-10-35

cszer commented 4 years ago

hello ,i have the same issue while training my own model(i also adapt code fro pythorch 1.1.0),you need to ner_model.load_state_dict(checkpoint_file['state_dict'],strict=False)

cszer commented 4 years ago

and also dont use highways because highways split your feature vectors,and you unable to load model with this sturcture

cszer commented 4 years ago

i also reccomend to save all train dev and test sets after constucting dataset stage to .pkl file,because if you want to tune hyperparams it will save your time because stages with loading vectors and constructing dataset you may skip