All Projects → SeanLee97 → Qanet_dureader

SeanLee97 / Qanet_dureader

Licence: mit
QANet+DuReader中文机器阅读理解

Programming Languages

python
139335 projects - #7 most used programming language

QANet_dureader

本人曾随队在mrc2018机器阅读理解比赛中获得TOP11的名次,当时使用的是BIDAF,现尝试使用QANet去尝试dureader数据集

QANet

  • 残差块: 使用了残差网络来加深网络深度
  • 自注意: Google采用了自家的multihead attention 来计算self attention
  • 强化位置信息: QANet强化了位置信息,在每个卷积块中都加入了时间序列信息,可查看layers / residual_block / add_timing_signal_ld

小小改进

加入原始位置信息(position embedding)在decoder层做Attention计算

模型

requirements

tensorflow 1.6+
jieba

语料预处理

包括生成词典,使用预训练词向量,本模型支持Chinese-Word-Vectors中预训练词向量,下载该模型词向量后在cli.py中指定即可.

python3 cli.py --prepro

训练

python3 cli.py --train [arguments]

或者直接采用封装好的bash训练

bash train.sh

使用全量数据训练

请先下载全量数据,已封装bash

bash data/download_dureader.sh

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].