Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNN Models #20

Open
5 tasks
Tracked by #17
jramapuram opened this issue Jun 18, 2015 · 12 comments
Open
5 tasks
Tracked by #17

RNN Models #20

jramapuram opened this issue Jun 18, 2015 · 12 comments
Assignees
Labels
Milestone

Comments

@jramapuram
Copy link
Member

Once we have an implementation of the Layer Class #17 , the Optimizer class and the DataSet class we can go about creating RNN flavors. There are 3 models that should be implemented:

  • Vanilla RNN
  • LSTM
  • GRU

These will require the implementation of their derivatives and their forward prop values.
Certain details to consider:

  • RNN's have a stack of weight matrices and bias' (not just 1 per Layer, thus the Layer needs to be general enough to handle this)
  • The optimization needs to be handled via two methods:
    • RTRL (real time recurrent learning) &
    • BPTT (backprop through time)

To enable the above two methods of learning we should consider inheriting from Layer and implementing a Recurrent Layer.

@sherjilozair
Copy link

BPTT is much more popularly used than RTRL, so might be better to prioritize BPTT over RTRL.

@jramapuram
Copy link
Member Author

BPTT doesn't solve the stateful RNN problem unfortunately.
Truncated BPTT is a crude approximation as well as i
Also, there are a plethora of BPTT solutions already: keras, blocks, lasagne, chainer, ...

The only way to have an online RNN is to use RTRL as each step utilizes the full jacobian product from the previous time step as this allows for smooth information flow.

@sherjilozair
Copy link

Pretty much all other RNN implementations are slow, and not suitable for production. My own reason for betting on arrayfire is that this might yield production-ready implementations for deep learning algorithms.

@pavanky pavanky mentioned this issue Jul 10, 2017
Closed
4 tasks
@jramapuram
Copy link
Member Author

I will be doing an internship till Sept and won't have time to update till then most likely. If someone wants to implement these first that would be great now that we have AD setup.

@pavanky pavanky mentioned this issue Jul 10, 2017
20 tasks
@WilliamTambellini
Copy link

Hi, I would be interested by either LSTM or GRU, forward pass would be a good first step before implementing backward/training.

@pavanky pavanky added this to the 0.1 milestone Jul 11, 2017
@pavanky
Copy link
Member

pavanky commented Jul 11, 2017

@jramapuram I am going to try and implement this. May be you and @WilliamTambellini review this once I send a PR.

@WilliamTambellini
Copy link

Hi @pavanky
it sounds good. GRU is usually a little simpler to implement than LSTM but your choice.
Have you thought about a possible example application (text generation, summarization, translation, question&answer, ...) ?
Cheers
W.

@jramapuram
Copy link
Member Author

I suggest a simple char-run type problem

@pavanky
Copy link
Member

pavanky commented Jul 12, 2017

@jramapuram @WilliamTambellini If you have specific examples in mind please let me know. Preferably implemented as an example in another ML toolkit already :)

@pavanky
Copy link
Member

pavanky commented Jul 12, 2017

@jramapuram @WilliamTambellini I think I am going to target this example as a first step: https://github.com/pytorch/examples/tree/master/word_language_model

@pavanky pavanky self-assigned this Jul 23, 2017
@WilliamTambellini
Copy link

Hi @pavanky It sounds very good: the Penn db is quite small (about 5M) and training time should nt be long. Perfect for an example. Have you opted between Elman, GRU, or LSTM ?

@pavanky
Copy link
Member

pavanky commented Aug 29, 2017

@WilliamTambellini Will start with plain (Elman) RNNs first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants