When I tried your implementation, I've got the following error.
(I use Tensorflow 0.12 version as backend).
Do you have any solution?
(tensorflow_0.12) C:\Users\admin\Google 드라이브\SRC_Code\HierAtt_TextClassification\hierarchical-attention-networks>python imdb_train.py
Using TensorFlow backend.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cudnn64_5.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally
Loading data...
25000 train sequences
25000 test sequences
Pad sequences (samples x time)
X_train shape: (25000, 1, 80)
X_test shape: (25000, 1, 80)
Build model...
Traceback (most recent call last):
File "imdb_train.py", line 31, in
model, modelAttEval = createHierarchicalAttentionModel(maxlen, embeddingSize = 200, vocabSize = max_features)
File "C:\Users\admin\Google 드라이브\SRC_Code\HierAtt_TextClassification\hierarchical-attention-networks\model.py", line 84, in createHierarchicalAttentionModel
attention = AttentionLayer()(wordRnn)
File "H:\Anaconda3\envs\tensorflow_0.12\lib\site-packages\keras\engine\topology.py", line 572, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "H:\Anaconda3\envs\tensorflow_0.12\lib\site-packages\keras\engine\topology.py", line 635, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "H:\Anaconda3\envs\tensorflow_0.12\lib\site-packages\keras\engine\topology.py", line 166, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "C:\Users\admin\Google 드라이브\SRC_Code\HierAtt_TextClassification\hierarchical-attention-networks\model.py", line 33, in call
multData = K.exp(K.dot(x, self.Uw))
File "H:\Anaconda3\envs\tensorflow_0.12\lib\site-packages\keras\backend\tensorflow_backend.py", line 819, in dot
y_permute_dim = [y_permute_dim.pop(-2)] + y_permute_dim
IndexError: pop index out of range