EdGENetworks / attention-networks-for-classification

Hierarchical Attention Networks for Document Classification in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sentence model bug when GRU are not bidirectional

gabrer opened this issue · comments

A small bug does not allow to train the network when Bidirectional is set to False.

In "model.py", on line 135, Bidirectional should be set to "False": Line 135

From:
self.sent_gru = nn.GRU(word_gru_hidden, sent_gru_hidden, bidirectional= True)
to:
self.sent_gru = nn.GRU(word_gru_hidden, sent_gru_hidden, bidirectional= False)

Thanks for finding this out, I have updated the code to reflect this change.