Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I add LSTM before CRF layer #77

Open
zwd13122889 opened this issue Nov 16, 2019 · 2 comments
Open

How can I add LSTM before CRF layer #77

zwd13122889 opened this issue Nov 16, 2019 · 2 comments

Comments

@zwd13122889
Copy link

No description provided.

@azmat21
Copy link

azmat21 commented Dec 5, 2019

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

@zwd13122889
Copy link
Author

thank you . In my data , i hava 80 categories , the FBI = 55. How can i improve my accuracy ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants