Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
"End-To-End Memory Networks" in Tensorflow
| Date | Stars |
|---|---|
| 2026-07-24 | 825 |
| 2026-07-25 | 825 |
| 2026-07-28 | 825 |
| 2026-07-30 | 825 |
| 2026-08-06 | 825 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
End-To-End Memory Networks in Tensorflow
========================================
Tensorflow implementation of [End-To-End Memory Networks](http://arxiv.org/abs/1503.08895v4) for language modeling (see Section 5). The original torch code from Facebook can be found [here](https://github.com/facebook/MemNN/tree/master/MemN2N-lang-model).

Prerequisites
-------------
This code requires [Tensorflow](https://www.tensorflow.org/). There is a set of sample Penn Tree Bank (PTB) corpus in `data` directory, which is a popular benchmark for measuring quality of these models. But you can use your own text data set which should be formated like [this](data/).
When you use docker image tensorflw/tensorflow:latest-gpu, you need to python package future.
$ pip install future
If you want to use `--show True` option, you need to install python package `progress`.
$ pip install progress
Usage
-----
To train a model with 6 hops and memory size of 100, run the following command:
$ python main.py --nhop 6 --mem_size 100
To see all training options, run:
$ python main.py --help
which will print:
usage: main.py [-h] [--edim EDIM] [--lindim LINDIM] [--nhop NHOP]
[--mem_size MEM_SIZE] [--batch_size BATCH_SIZE]
[--nepoch NEPOCH] [--init_lr INIT_LR] [--init_hid INIT_HID]
[--init_std INIT_STD] [--max_grad_norm MAX_GRAD_NORM]
[--data_dir DATA_DIR] [--data_name DATA_NAME] [--show SHOW]
[--noshow]
optional arguments:
-h, --help show this help message and exit
--edim EDIM internal state dimension [150]
--lindim LINDIM linear part of the state [75]
--nhop NHOP number of hops [6]
--mem_size MEM_SIZE memory size [100]
--batch_size BATCH_SIZE
batch size to use during training [128]
--nepoch NEPOCH number of epoch to use during training [100]
--init_lr INIT_LR initial learning rate [0.01]
--init_hid INIT_HID initial internal state value [0.1]
--init_std INIT_STD weight initialization std [0.05]
--max_grad_norm MAX_GRAD_NORM
clip gradients to this norm [50]
--checkpoint_dir CHECKPOINT_DIR
checkpoint directory [checkpoints]
--data_dir DATA_DIR data directory [data]
--data_name DATA_NAME
data set name [ptb]
--is_test IS_TEST True for testing, False for Training [False]
--nois_test
--show SHOW print progress [False]
--noshow
(Optional) If you want to see a progress bar, install `progress` with `pip`:
$ pip install progress
$ python main.py --nhop 6 --mem_size 100 --show True
After training is finished, you can test and validate with:
$ python main.py --is_test True --show True
The training output looks like:
$ python main.py --nhop 6 --mem_size 100 --show True
Read 929589 words from data/ptb.train.txt
Read 73760 words from data/ptb.valid.txt
Read 82430 words from data/ptb.test.txt
{'batch_size': 128,
'data_dir': 'data',
'data_name': 'ptb',
'edim': 150,
'init_hid': 0.1,
'init_lr': 0.01,
'init_std': 0.05,
'lindim': 75,
'max_grad_norm': 50,
'mem_size': 100,
'nepoch': 100,
'nhop': 6,
'nwords': 10000,
'show': True}
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 12
I tensorflow/core/common_runtime/direct_session.cc:45] Direct session inter op parallelism threads: 12
Training |################################| 100.0% | ETA: 0s
Testing |################################| 100.0% | ETA: 0s
{'perplexity': 507.3536108810464, 'epoch': 0, 'valid_perplexity': 285.19489755719286, 'learning_rate': 0.01}
Training |################################| 100.0% | ETA: 0s
Excerpt of 5,462 characters
Read on GitHubTaehoon · United States
45
5
1
Gabriel Huang · @ServiceNow · Canada
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:1b8179f8c27e158a, topic:tensorflow
matched fp:1b8179f8c27e158a, topic:nlp