README.md 927 Bytes
Newer Older
1
2
3
4
5
6
7
8
# Tree-LSTM
This is a re-implementation of the following paper:

> [**Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks**](http://arxiv.org/abs/1503.00075)
> *Kai Sheng Tai, Richard Socher, and Christopher Manning*.

The provided implementation can achieve a test accuracy of 51.72 which is comparable with the result reported in the original paper: 51.0(±0.5).

9
10
11
12
13
14
15
16
17
18
## Dependencies
* MXNet nightly build
* requests
* nltk

```bash
pip install mxnet --pre
pip install requests nltk
```

19
20
21
22
23
## Data
The script will download the [SST dataset] (http://nlp.stanford.edu/sentiment/index.html) and the GloVe 840B.300d embedding automatically if `--use-glove` is specified (note: download may take a while).

## Usage
```
24
DGLBACKEND=mxnet python3 train.py --gpu 0
25
26
27
28
29
```

## Speed Test

See https://docs.google.com/spreadsheets/d/1eCQrVn7g0uWriz63EbEDdes2ksMdKdlbWMyT8PSU4rc .