git clone https://github.com/xiao10ma/ANN-hm.git
cd ANN-hm
pip install -r requirements.txt
链接: https://pan.baidu.com/s/11UHNkqyhvvZTOfvob1tSyw?pwd=5u3k 提取码: 5u3k
Move the data in to the data directory, it looks like this:
data
├── test.jsonl
├── train_100k.jsonl
├── train_10k.jsonl
└── valid.jsonl
Then, you can run the project with just(default use GRU):
python train.py
You can choose different model(GRU, LSTM) in the main function.
MODEL = 'GRU' # 'LSTM'
To visualize the training process, you can use tensorboard:
tensorboard --logdir={record_path}
Command Line Arguments for train.py
Path to the record, you can use tensorboard to visualize it.
Path where the trained model should be stored (trained_model/{Modelname}
by default).
Integer to set the embedded word vector size.
--hidden_size
Integer to set the hidden output size.
Every save_ep epochs, the program will save the trained model. Default 50.
Every save_latest_ep epochs, the program will save the trained model. Default 10.
If you have any questions, please contact me through email. My email: mazp@mail2.sysu.edu.cn