GithubHelp home page GithubHelp logo

chainer_examples's Introduction

Chainer example code for NLP

This repository is out of date and rough. I do not guarantee that these code works correctly.

I am developing a new NMT toolkit NMTKit and strongly recommend to use it instead of these samples to train neural translation models.

This repository contains some neural network examples for natural language processing (NLP) using Chainer framework.

Chainer Official (GitHub)

Making Local Client

Before running these scripts, making a local python client using pyenv is reccomended, like:

$ pyenv install 3.5.0
$ pyenv virtualenv 3.5.0 example
$ pyenv shell example
$ pip install chainer

Contents

  • Machine Translation

    • mt_s2s_encdec.py - Using encoder-decoder style recurrent neural network
    • mt_s2s_attention.py - Using attentional neural network
  • Word Segmentation (Tokenization)

    • seg_ffnn.py - Using feedforward neural network
    • seg_rnn.py - Using recurrent neural network
  • Language Model

    • lm_rnn.py - Using recurrent neural network (RNNLM)

Contact

If you find an issue or have some questions, please contact Yusuke Oda:

  • @odashi_t on Twitter (faster than other methods)
  • yus.takara (at) gmail.com

chainer_examples's People

Contributors

himkt avatar nzw0301 avatar odashi avatar prajdabre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chainer_examples's Issues

Attention Mechanism is Very Slow

Hi,
Your attention mechanism is quite slow. Since you compute the linear projections (aw and bw) each time although they do not change, the time is almost quadratic.

I have implemented a faster version of attention which does a lot of precomputation and would like to push it as soon as I am done testing.

Regards.

a float is required , : lm_rnn.py

Hi, I have some problem.
I compile the code that lm_rnn.py

a float is required...

File "lm_rnn.py", line 219, in
main()
File "lm_rnn.py", line 213, in main
save_rnnlm_model(args.model + '.%d' % (epoch + 1), args.vocab, args.embed, args.hidden, vocab, model)
File "lm_rnn.py", line 107, in save_rnnlm_model
print(dlm.join(fmt % x for x in row), file=fp)
File "lm_rnn.py", line 107, in
print(dlm.join(fmt % x for x in row), file=fp)
TypeError: a float is required

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.