macanv / BERT-BiLSTM-CRF-NER

Tensorflow solution of NER task Using BiLSTM-CRF model with Google BERT Fine-tuning And private Server services
https://github.com/macanv/BERT-BiLSMT-CRF-NER
4.71k stars 1.26k forks source link

预测时dropout设置问题 #295

Closed Gang-Yang closed 4 years ago

Gang-Yang commented 4 years ago

在lstm_crf_layer.py文件中,通过变量is_training控制dropout,但是我发现is_training只能控制embedding的dropout,并没有控制rnn的dropout。按理来说预测时rnn的dropout也应该置为1. 不知道这里是不是有点问题。

macanv commented 4 years ago

是的,但是在测试的时候,输入的dropout_rate是1