All Projects → camigord → Neural-Turing-Machine

camigord / Neural-Turing-Machine

Licence: other
TensorFlow implementation of a Neural Turing Machine

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Neural-Turing-Machine

TensorFlow-Binary-Image-Classification-using-CNN-s
Binary Image Classification in TensorFlow
Stars: ✭ 26 (+13.04%)
Mutual labels:  tensorflow-models, tensorflow-examples
Android-Machine-Learning-With-TensorFlow
Tensor Flow implementation for Android
Stars: ✭ 17 (-26.09%)
Mutual labels:  tensorflow-models, tensorflow-examples
gans-2.0
Generative Adversarial Networks in TensorFlow 2.0
Stars: ✭ 76 (+230.43%)
Mutual labels:  tensorflow-models, tensorflow-examples
Age-Gender Estimation TF-Android
Age + Gender Estimation on Android with TensorFlow Lite
Stars: ✭ 34 (+47.83%)
Mutual labels:  tensorflow-models, tensorflow-examples
Free Tensorflow
Tensorflow 免费中文视频教程,开源代码,免费书籍.
Stars: ✭ 83 (+260.87%)
Mutual labels:  tensorflow-models, tensorflow-examples
Awesome-Tensorflow2
基于Tensorflow2开发的优秀扩展包及项目
Stars: ✭ 45 (+95.65%)
Mutual labels:  tensorflow-models, tensorflow-examples
Tensorflow-Wide-Deep-Local-Prediction
This project demonstrates how to run and save predictions locally using exported tensorflow estimator model
Stars: ✭ 28 (+21.74%)
Mutual labels:  tensorflow-models, tensorflow-examples
Cppflow
Run TensorFlow models in C++ without installation and without Bazel
Stars: ✭ 357 (+1452.17%)
Mutual labels:  tensorflow-models, tensorflow-examples
Math object detection
An image recognition/object detection model that detects handwritten digits and simple math operators. The output of the predicted objects (numbers & math operators) is then evaluated and solved.
Stars: ✭ 52 (+126.09%)
Mutual labels:  tensorflow-models, tensorflow-examples
Letslearnai.github.io
Lets Learn AI
Stars: ✭ 33 (+43.48%)
Mutual labels:  tensorflow-models, tensorflow-examples
Androidtensorflowmachinelearningexample
Android TensorFlow MachineLearning Example (Building TensorFlow for Android)
Stars: ✭ 1,369 (+5852.17%)
Mutual labels:  tensorflow-models, tensorflow-examples
Tf Object Detection
Simpler app for tensorflow object detection API
Stars: ✭ 91 (+295.65%)
Mutual labels:  tensorflow-models, tensorflow-examples
Open nsfw android
🔥🔥🔥色情图片离线识别,基于TensorFlow实现。识别只需20ms,可断网测试,成功率99%,调用只要一行代码,从雅虎的开源项目open_nsfw移植,该模型文件可用于iOS、java、C++等平台
Stars: ✭ 1,586 (+6795.65%)
Mutual labels:  tensorflow-models, tensorflow-examples
Dkeras
Distributed Keras Engine, Make Keras faster with only one line of code.
Stars: ✭ 181 (+686.96%)
Mutual labels:  tensorflow-models
tf-examples
TensorFlow examples
Stars: ✭ 23 (+0%)
Mutual labels:  tensorflow-examples
Fast Weights
Implementation of the paper [Using Fast Weights to Attend to the Recent Past](https://arxiv.org/abs/1610.06258)
Stars: ✭ 171 (+643.48%)
Mutual labels:  tensorflow-models
Machine-Learning
🌎 I created this repository for educational purposes. It will host a number of projects as part of the process .
Stars: ✭ 38 (+65.22%)
Mutual labels:  tensorflow-models
Deep News Summarization
News summarization using sequence to sequence model with attention in TensorFlow.
Stars: ✭ 167 (+626.09%)
Mutual labels:  tensorflow-models
Tensorflow Anpr
Automatic Number (License) Plate Recognition using Tensorflow Object Detection API
Stars: ✭ 142 (+517.39%)
Mutual labels:  tensorflow-models
Ios tensorflow objectdetection example
An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101
Stars: ✭ 126 (+447.83%)
Mutual labels:  tensorflow-models

Neural-Turing-Machine

This is a TensorFlow implementation of Neural Turing Machine. The code is inspired on the DNC implementation of Mostafa-Samir and it therefore follows the same structure and organization. However, some of the content addressing functions were adapted from the NTM implementation from carpedm20.

The code is designed to deal with variable length inputs in a more efficient way than the reference code provided by carpedm20.

The implementation currently supports only the copy task described in the paper.

[Important Notes]:

  1. For training efficiency, I replaced the circular convolution code proposed by carpedm20 in order to use some already optimized TensorFlow functions. This code, however, was hard-coded for batch_sizes=1 and shift_range = 1. If you want to use other values, remember to either modify the proposed function (apply_conv_shift - memory.py) or to replace the function by the commented code.

  2. In a similar way, the Hamming distance computation used in train.py for performance visualization is currently hard-coded for batch_sizes=1. Modifying this, however, should be much simpler...

  3. I experienced the typical problem of the gradients becoming nan when training with a max_sequence_length of 20. I have not been able to find any robust solution to this problem, but the code seems to converge when trained with a sequence length of 10. Some have suggested to perform curriculum learning to avoid this issue, but I currently have not tried this option.

Local Environment Specifications

The model was trained and tested on a machine with:

  • Intel® Core™ i7-2700K CPU @ 3.50GHz × 8
  • 16GB RAM
  • No GPU
  • Ubuntu 14.04 LTS
  • TensorFlow r0.12
  • Python 2.7

Usage

To train a copy task:

python train.py --iterations=100000

Results for the copy task

You can generate similar results or play with the sequence length in the visualization notebook.

It is really interesting to check the memory location map, where you can see that the network learns to address the memory in a sequential way and in the same order they were written into.

As I mentioned, this model was trained with a maximum sequence length of 10, but it can generalize to longer sequences (in this case sequence length = 30).

results

Training loss

I trained the model with a recurrent controller, a maximum sequence length of 10 and an input size of 8 bits + 2 flags (start and finish) for 100000 iterations. The learning process can be seen below:

hamming

loss

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].