BERT-NER
BERT-NER copied to clipboard
How can I add LSTM before CRF layer
you add LSTM in hidden2tag function, then both crf and softmax can use it
def hidden2tag(hiddenlayer,numclass):
bi = tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(100, return_sequences=True))
linear = tf.keras.layers.Dense(numclass,activation=None)
hiddenlayer = bi(hiddenlayer)
hiddenlayer = linear(hiddenlayer)
return hiddenlayer
thank you . In my data , i hava 80 categories , the FBI = 55. How can i improve my accuracy ?