5

I wondering if someone can suggest a good library or reference (tutorial or article) to implement a Recurrent Neural Network (RNN).

I tried to use the rnnlib by Alex Graves, but I had some troubles in changing the architecture to adapt the network to my needs.

In particular, I'm trying to recognize strings coming from a regular language, using positive and negative samples.

This is an example of my training set:

str1: w1 w2 ... wn --> label 1 (it is a valid string for the language)

str2: w1 w2 ... wi --> label 0 (it does not belong to the language)

where wi are drawn from the alphabet of the unknown language.

Thanks in advance.

G_Zak
  • 53
  • 1
  • 5

2 Answers2

2

For tools, I would highly recommend TensforFlow.

greeness
  • 15,956
  • 5
  • 50
  • 80
  • 1
    Keras or PyTorch should be the defacto frameworks for all newbies especially for such simple tasks. TF is a framework for production ready models and not for experimenting or trying to learn things. – minerals Mar 01 '18 at 10:21
2

For quickly doing, just use DyNet. The most attractive point is that the graph is built dynamicly(as it's name). This makes it different from tensorflow, theano, or may be MXNet. the lstm has already been implemente as a class, just use it directly. So easy and straightforward, just visit and do it. no doc, but example is totally suit, just to copy and mofied it.

sorry for writing by phone.