HAN model. Three versions.
- version 1: Tensorflow, dynamic GRU
- version 2: Pytorch, pack_padded_sequence
- version 3: Pytorch, mask matrix
Hierarchical Attention Network (readed in 2017/10 by szx)
- Text Classification
-
data: API for loading text data
-
models: HAN model
- hierarchical_tf.py : version 1
- hierarchical_pack.py : version 2
- hierarchical_mask.py : version 3
-
preprocessor: Data preprocessing
-
utils: tools for training
-
config.py: hyperparameters for models
CUDA_VISIBLE_DEVICES=X python train.py --model-id 4 --is-save (y or n)
-
The model was implemented in BDCI2017.
-
We implement eight models, such as FastText, TextCNN, TextRNN, RCNN, HAN, CNNInception, CNNWithDoc2Vec, RCNNWithDoc2Vec.
-
I just make contribution to HAN model.
-
Thanks for my teammates, lhliu, dyhu.