Created
August 24, 2016 18:41
-
-
Save kudkudak/2e3aadf0ae228e910999295df5e95541 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Embedding(self.vocabulary_size + 1, self.word_dim, | |
trainable=True, mask_zero=True, | |
dropout=self.dropout, | |
input_length=self.max_len)(sequence) | |
forward = LSTM(self.hidden_size, return_sequences=True)(emb) | |
backward = LSTM(self.hidden_size, go_backwards=True, return_sequences=True)(emb) | |
merged = merge([forward, backward], mode='concat')#, concat_axis=-1) # for theano uncomment | |
output = TimeDistributed(Dense(len(self.tag2ind), activation="softmax"))(merged) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment