资源算法 Scala-NTM

Scala-NTM

2020-02-26 | |  35 |   0 |   0

Scala Neural Turning Machine

Build Status

This is a hard coded Neural Turning Machine (NTM) ported from fumin/ntm.

We use 2D instead of 1D Array for value and gradient memory so the array objects can replace the pointers in Go.

Since this is ported from Go, a lot of implementations are still far from optimal in Scala. (Notes)

TESTS:

  •  Unit Tests

  •  Copy Task

  •  Repeat Copy

  •  nGram

STATUS:

Unit tests are successful, and had done a 1 to 1 value comparison with fumin's project. (tested with the same random seed)

Examples are tested. We are able to train and improve the predict rate with the down-scaled examples.

Getting serious computation performance issues.

USAGES:

Run the unit tests: sbt test

Build the Jar file: sbt package

Run examples: sbt run

NOTES:

Currently, the computation performance is 1000 times worse than the Go version.

The comparison is based on the CopyTask example and RepeatCopy example computation time on my laptop. Therefore, all examples are down-scaled for reasonable testing time.

Please don't hesitate to contribute if you find any computation bottleneck.

Possible Bottleneck Improvements:

  1. Replace those for loops with while loops

  2. Replace Array with other collection classes

  3. Remove object creations in loops

  4. Just .par the problem

  5. Use NDArray with MxNet to improve tensor computations. Since this repo is for no dependency, might create another repo.


上一篇:VQA_NTM

下一篇:ntm_extension

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...