Code Monkey home page Code Monkey logo

codes's Introduction

codes

Pytorch implementation for paper of "Concept Pointer Network for Abstractive Summarization".

pytorch 0.4 with python 2.7

How to train?
before train
  • Our conceptual vocabulary in code/data/vocabulary/concept_vocab,the number of conceptual words needs to be set before train.
  • You need to change some path and parameters in code/codespace/data_util/config.py before train.
Cross-Entropy Object Function
  • python train.py None or python train.py (position of model parameters)
  • When you use Cross-Entropy Object Function train the model,set RL_train = False and DS_train = False in code/codespace/data_util/config.py
reinforcement learning(RL)
  • Before use RL train the model, you need use Cross-Entropy Object Function train the model and set the Cross-Entropy train times in code/codespace/data_util/config.py, finally the model will automatically use reinforcement learning to train the model when the train times exceed the Cross-Entropy train times.
  • When you use RL train the model,set RL_train = True and DS_train = False in code/codespace/data_util/config.py
Distant Supervision(DS)
  • Before use DS train the model, you need use Cross-Entropy Object Function train the model and Retain model parameters,then use the command “python train.py (position of model parameters)” train the model.
  • When you use DS train the model,set DS_train = True and RL_train = False in code/codespace/data_util/config.py
How to test?
  • python decode.py (position of model parameters)

other

codes's People

Contributors

wprojectsn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.