Experiments:
- Use HANs with LSTM network to classify sentiment
- Use HANs with LSTM + attention to classify sentiment
Run the following commands
git clone https://github.com/mandalbiswadip/hierarchical-attention-networks.git
cd hierarchical-attention-networks
unzip data.zip
pip install -r requirements.txt
python3 create_training_data.py
python3 train_attention.py
python3 train_lstm.py
See the Analysis at:
analyze attention.ipynb
See related blog at: Self-Attention and HANs