Giter Club home page Giter Club logo

lstm's Introduction

LSTM

Project currently abandoned, similar toolkit for computing on GPU in LSTMLM repo.

LSTM Neural Network in Python and Cython, used for language modelling

Based on LSTM RNN, model proposed by Jürgen Schmidhuber http://www.idsia.ch/~juergen/ Inspired by RNN LM toolkit by Tomas Mikolov http://www.fit.vutbr.cz/~imikolov/rnnlm/

Implemented by Daniel Soutner, Department of Cybernetics, University of West Bohemia, Plzen, Czech rep. [email protected], 2013

Licensed under the 3-clause BSD.

INSTALLATION:

You will need:

Python libs:

  • numpy
  • argparse (is in python 2.7 and higher)
  • gensim (for LDA extension)

Files:

  • LSTM.py
  • ArpaLM.py
  • setup.py
  • lstm.py
  • fast.pyx
  • lda.py
  • fastonebigheader.h

run python setup.py build_ext --inplace --force

USAGE:

train LSTM LM on text and save

python lstm.py --train train.txt dev.txt test.txt --hidden 100 --save-net example.lstm-lm

sentences are processed independently (net is reset after every sentence), vocabulary limited to example.vocab (word-per-line)

python lstm.py --train train.txt dev.txt test.txt --hidden 100 --save-net example.lstm-lm --independent --vocabulary example.vocab

load net and evaluate on perplexity

python lstm.py --load-net example.lstm-lm --ppl valid2.txt

load net, combine with ARPA LM and evaluate

python lstm.py --load-net example.lstm-lm --ppl valid2.txt --srilm-file ngram.model.arpa --lambda 0.2

load net and rescore nbest list

python lstm.py --load-net example.lstm-lm --nbest-rescore nbest.list --wip 0 --lmw 11

lstm's People

Contributors

dansoutner avatar

Watchers

 avatar  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.