5

Is there any available recursive neural network implementation in TensorFlow TensorFlow's tutorials do not present any recursive neural networks. Most TensorFlow code I've found is CNN, LSTM, GRU, vanilla recurrent neural networks or MLP. I am most interested in implementations for natural language processing.

Example of a recursive neural network:

enter image description here

The tree structure may vary between different inputs. I.e., I do not want the tree structure to be fixed.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Franck Dernoncourt
  • 42,093
  • 30
  • 155
  • 271
  • I was looking for something similar, if you're open to using theano instead of tensorflow you could have a look https://github.com/ofirnachum/tree_rnn. There are a few examples on display. – Lukasz Nov 22 '16 at 17:42

3 Answers3

1

Take a look at Tensorflow Fold:

https://github.com/tensorflow/fold

TensorFlow Fold is a library for creating TensorFlow models that consume structured data, where the structure of the computation graph depends on the structure of the input data.

0

These types of architectures are awkward in Tensorflow. I think someone did implement them though. http://www.kdnuggets.com/2016/06/recursive-neural-networks-tensorflow.html

You might prefer to use DyNet, which was designed to allow for dynamically changing architectures. https://github.com/clab/dynet

Aaron
  • 3,025
  • 14
  • 24
0

I hope this is what you need: https://github.com/sapruash/RecursiveNN:

Tensorflow implementation of Recursive Neural Networks using LSTM units as described in "Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks" by Kai Sheng Tai, Richard Socher, and Christopher D. Manning.

Franck Dernoncourt
  • 42,093
  • 30
  • 155
  • 271