LM-LSTM-CRF
LM-LSTM-CRF copied to clipboard
Is word level bi-lstm reflected in the code ?
Hi there,
Excuse the naiveness, I am having a bit of trouble understanding how the word-level bi-directional lstm (before the CRF layer) in the paper is reflected in the code, to be specific see the arrows in the image below.
Why is there only one word_lstm
in the lm_lstm_crf.py
?
I see that in train_wc.py
, if co_train
is enabled, a bi-directional word level lstm is applied, but this after the CRF layer ?, shouldn't it be before the concatenated output passed to CRF as shown in the model architecture in the paper?
May be I am missing something really big & obvious :/
Thanks,
By selecting co-train you just update the loss coming from LM, the bi-directional world level has been already applied on ner-model in lm_lstm_crf.py from following line in the code: https://github.com/LiyuanLucasLiu/LM-LSTM-CRF/blob/e468974ce2193a5579417f9e253eb6c997932636/model/lm_lstm_crf.py#L245