LM-LSTM-CRF icon indicating copy to clipboard operation
LM-LSTM-CRF copied to clipboard

Is word level bi-lstm reflected in the code ?

Open unktkn opened this issue 6 years ago • 1 comments

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.

image

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,

unktkn avatar Dec 30 '18 17:12 unktkn

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

nooralahzadeh avatar Apr 10 '19 07:04 nooralahzadeh