Code Monkey home page Code Monkey logo

theano-ltrre's Introduction

Theano implementation of Learning to Remember Rare Events by Kaiser et al. (https://arxiv.org/abs/1703.03129)

The memory module acts as a standalone component to a neural network, and serves as a medium for the network to store and retrieve external information.

An analogy for this module is to think of it as a differentiable dictionary, where the keys of the dictionary are learned by the neural network. These keys represent high-level features of an input, and may be shared across many different inputs (i.e. so long as these features are similar). The values these keys are bound to represent the class labels of a given sample.

Dependencies:

To run the example:

python mnist.py

You should see something like:

Starting training...
Epoch 1 of 2 took 56.404s
  training loss:                0.042020
  validation loss:              0.024000
  validation accuracy:          96.88 %
Epoch 2 of 2 took 55.051s
  training loss:                0.022224
  validation loss:              0.018059
  validation accuracy:          97.65 %

Known limitations:

Due to the dependence of T.argsort for finding the k-nearest neighbours, there is some inefficiency for larger memory sizes (e.g. 10k) due to the entire memory being sorted. Some speedup can likely be achieved either via a theano wrapper to numpy.argpartition, or during training, by calculating the neighbours on the CPU and passing them to the training function.

theano-ltrre's People

Contributors

mveres01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

theano-ltrre's Issues

Unable to get reported results, loss 0 but accuracy ~11%

Hi
Thank you for the code

I was trying out your code but I'm having trouble replicating your results
Starting training...
Epoch 1 of 2 took 56.404s
training loss: 0.042020
validation loss: 0.024000
validation accuracy: 96.88 %

.
.
.
.

What I'm getting:
Loading data and creating train/test splits...
Starting training...
Epoch 1 of 20 took 271.095s
training loss: 0.000000
validation loss: 0.000000
validation accuracy: 11.09 %

I've only changed epochs from 100 to 20 and nothing else. Please can you tell me the hyperparameters you used? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.