Daanet
DAANet: Dual Ask-Answer Network for Machine Reading Comprehension
Install / Use
/learn @hanxiao/DaanetREADME
DAANet: Dual Ask-Answer Network for Machine Reading Comprehension

Requirements
- Python >= 3.6
- Tensorflow >= 1.6 (self-compiled TF-gpu is recommended!)
- gputil >= 1.3.0
- GPU
Usage
For dual learning run:
python grid_search.py daanet
For QA-only model (corresponds to mono in the experiment) run:
python grid_search.py monoqa
For QG-only model (corresponds to mono in the experiment) , run :
python grid_search.py monoqg
All hyperparameters used in the paper are stored in default.yaml:
You can change the data path and save dir in grid.yaml
Evaluation
Evaluation on the dev set is automatically done after each epoch.
To do evaluation manually,
python app.py evaluate ~/save/models/DDMM-HHMMSS/default.yaml
, where ~/save/models/DDMM-HHMMSS/default.yaml is the saved yaml config of model DDMM-HHMMSS. It is created during the training procedure. It automatically loads the parameters from the best epoch (or fallback to the last epoch) to the model.
Continuous Training
python app.py train ~/save/models/DDMM-HHMMSS/default.yaml
It will load the best (or last) model so far and conducts incremental training.
Generated Samples
Selected outputs from DAANET and mono. Yellow text is question-related; green text is answer-related.

Attention Matrix
Question-Context and Answer Context attention matrices

Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
