资源算法QANet-Hyperbolic_Attention

QANet-Hyperbolic_Attention

2020-02-20 | |  40 |   0 |   0

QANet

A Pytorch implementation of QANet
The code is mostly based on the two repositories: hengruo/QANet-pytorch NLPLearn/QANet

Performance

Training epochs / StepsBatchSizeHiddenSizeAttention HeadsEMF1
12.8 / 35,0003296169.078.6
22 / 60,0003296169.779.2
12.8 / 93,20012128870.379.7
22 / 160,16012128870.780.0

*The results of hidden size 128 with 8 heads were run with 12 batches.

Requirements

  • python 3.6

  • pytorch 0.4.0

  • tqdm

  • spacy 2.0.11

  • tensorboardX

  • absl-py

Usage

Download and preprocess the data

# download SQuAD and Glove$ sh download.sh# preprocess$ python3.6 main.py --mode data

Train the model

# model/model.pt will be generated every epoch$ python3.6 main.py --mode train

Tensorboard

# Run tensorboard for visualisation$ tensorboard --logdir ./log/

TODO

  •  Add Exponential Moving Average

  •  Reach the performance of the paper with hidden size 96, 1 head.

  •  Test on hidden size 128, 8 head.


上一篇: keras_qanet

下一篇:QANet-no-answer

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...