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 example? #57

Open
alexanderkjeldaas opened this issue Dec 26, 2016 · 13 comments
Open

RNN example? #57

alexanderkjeldaas opened this issue Dec 26, 2016 · 13 comments

Comments

@alexanderkjeldaas
Copy link

I'd love to see an RNN example.

@blackgnezdo
Copy link
Contributor

Do you have a learning problem an a data set in mind that would be interesting?

@alexanderkjeldaas
Copy link
Author

alexanderkjeldaas commented Dec 26, 2016 via email

@blackgnezdo
Copy link
Contributor

blackgnezdo commented Dec 26, 2016

I like the data set, it seems to have non-trivial size. I found The Ubuntu Dialogue Corpus: A Large Dataset for Research in Unstructured Multi-Turn Dialogue Systems paper which references the logs. The logs are in text form. Do you know of a more structured representation of the same data? A big part of an ML system is pre-processing the raw data into a form which can be efficiently consumed by the learner. This is also a piece of the puzzle which is currently not easily expressed in TensorFlow.

I found this ubuntu-ranking-dataset-creator but it seems to be preparing the data for a ranking problem and not a chatbot.

@alexanderkjeldaas
Copy link
Author

@alexanderkjeldaas
Copy link
Author

How should it be expressed?

@alexanderkjeldaas
Copy link
Author

This series of blog posts uses the reddit data set http://lauragelston.ghost.io/speakeasy-pt1/
The code is here: https://github.com/Charging-Alot/SpeakEasy-AI
Maybe porting that could be a useful example? Or porting the english-french example from tensorflow that they based their system on.

@alexanderkjeldaas
Copy link
Author

Replicating this seq2seq setup is an alternative: https://github.com/spro/intense

@alexanderkjeldaas
Copy link
Author

@ghost
Copy link

ghost commented Apr 30, 2017

Hi @blackgnezdo and @alexanderkjeldaas , great idea,

I think starting with LSTM is not the most simplest example though, maybe the simplest RNN that works well is a GRU?

Here's some starter code,

https://github.com/suriyadeepan/rnn-from-scratch/blob/master/gru.py

Would be great for people to learn Haskel-TF from a useful example 👍

@delanoe
Copy link

delanoe commented Jul 26, 2017

Looking at the GRU example, it seems that current TF Haskell version does not support all functions used in the code above. Maybe I am wrong ? Do you have any insights to get started ?

@fkm3
Copy link
Contributor

fkm3 commented Jul 26, 2017

Enough is supported to implement an "unrolled" RNN with a fixed length. If you are brave, I have a WIP RNN example here: https://github.com/fkm3/tensorflow-haskell/blob/dqn/tensorflow-mnist/app/Seq.hs

It is using an LSTM, but there is also a GRU implementation in https://github.com/fkm3/tensorflow-haskell/blob/dqn/tensorflow-ops/src/TensorFlow/RNN.hs#L42

I'm distracted by my day job right now, so it might be a while before I finish it up and send the various pieces for review.

@delanoe
Copy link

delanoe commented Jul 28, 2017

Many thanks for your answer. This script helps to understand how to use the lib.

@rikvdkleij
Copy link
Contributor

Can someone share a working LSTM example? Many thanks in advance!

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

No branches or pull requests

5 participants