项目作者: mandalbiswadip

项目描述 :
Implementation of Hierarchical attention networks
高级语言: Python
项目地址: git://github.com/mandalbiswadip/hierarchical-attention-networks.git
创建时间: 2019-07-30T18:19:05Z
项目社区:https://github.com/mandalbiswadip/hierarchical-attention-networks

开源协议:MIT License

下载


Experiments:

  1. Use HANs with LSTM network to classify sentiment
  2. Use HANs with LSTM + attention to classify sentiment

Run the following commands

  1. git clone https://github.com/mandalbiswadip/hierarchical-attention-networks.git
  2. cd hierarchical-attention-networks
  3. unzip data.zip
  4. pip install -r requirements.txt

Create dataset

  1. python3 create_training_data.py

Training:

  1. python3 train_attention.py
  2. python3 train_lstm.py

Analyze results

See the Analysis at:

  1. analyze attention.ipynb

See related blog at: Self-Attention and HANs