项目作者: yunhenk

项目描述 :
Convolutional Neural Networks for Soft-Matching N-Grams in Ad-hoc Search
高级语言: Python
项目地址: git://github.com/yunhenk/Conv-KNRM.git
创建时间: 2019-02-22T02:26:53Z
项目社区:https://github.com/yunhenk/Conv-KNRM

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Conv-KNRM

This is an implementation of the paper:
Convolutional Neural Networks for Soft-Matching N-Grams in
Ad-hoc Search

Inspired by project K-NRM by the author.

Features

  • python3.6 compatible
  • latest tensorflow features.
    • ok with tensorflow 1.10 or later
  • a Conv-KNRM implementation

Requirements


  • Tensorflow
  • Numpy
  • traitlets

Run

To run the Conv-KNRM model, just append an argument ‘—convolution true’, for example:

Training

  1. python ./knrm/model/model_knrm.py config-file\
  2. --train \
  3. --train_file: path to training data\
  4. --validation_file: path to validation data\
  5. --train_size: size of training data (number of training samples)\
  6. --checkpoint_dir: directory to store/load model checkpoints\
  7. --load_model: True or False. Start with a new model or continue training \
  8. --convolution true

Testing:

  1. python ./knrm/model/model_knrm.py config-file\
  2. --test \
  3. --test_file: path to testing data\
  4. --test_size: size of testing data (number of testing samples)\
  5. --checkpoint_dir: directory to load trained model\
  6. --output_score_file: file to output documents score\
  7. --convolution true

For more details,see the original README file.