Skip to content

An implementation of N-aryTreeLSTM in pyTorch and mxNet

Notifications You must be signed in to change notification settings

zhixinma/TreeLSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

N-aryTreeLSTM

An implementation (in pyTorch and MXNet) of the N-ary Tree LSTM described in the paper Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks,Kai Sheng Tai, Richard Socher, and Christopher Manning.

equation

Note: "For large values of N (the allowed maximum number of child), these additional parameters are impractical and may be tied or fixed to zero."

This N-aryTreeLSTM can be use to process the Syntax Tree: equation

Requirements:

  • mxnet
  • nltk

Usage example:

encoder = N_aryTreeLstm()

encoder.initialize(ctx=ctx)

c, h = self.encoder(tree, inputs, 0, ctx)

About

An implementation of N-aryTreeLSTM in pyTorch and mxNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages