interpretable-han-for-document-classification-with-keras
interpretable-han-for-document-classification-with-keras copied to clipboard
Keras implementation of hierarchical attention network for document classification with options to predict and present attention weights on both word and sentence level.
Hi, I have an issue with the dummy layer you defined as: dummy_layer = Lambda( lambda x: att_layer._get_attention_weights(x) )(prev_tensor) It is not working in Tensorflow 2. Based on my search,...
`han.show_sent_attention(x)` is supposed to take in an array of size (max_sent_num, max_sent_length) as input. But the `return Model(self.model.input, dummy_layer).predict(x)` throws a ValueError, saying that the array should have 3 dimensions...
I have tried to implement your functions, and i really do like your work. However, i find that when using the han.show_word_attention() function the attention weights does not add up...
hello, I called part of your code including build_word_encoder and build_sent_encoder, but something went wrong, can you please help me? here is my error(your DENSE_SIZE=100, and I use 64 as...