Coder Social home page Coder Social logo

thtrieu / essence Goto Github PK

View Code? Open in Web Editor NEW
74.0 7.0 18.0 19.83 MB

AutoDiff DAG constructor, built on numpy and Cython. A Neural Turing Machine and DeepQ agent run on it. Clean code for educational purpose.

License: GNU General Public License v3.0

Python 92.11% C 7.89%
machine-learning dropout lstm mnist lenet neural-turing-machines question-answering computational-graphs auto-differentiation convolutional-neural-networks convolutional-networks recurrent-neural-networks lstm-model deep-learning deep-q-network reinforcement-learning cartpole

essence's Introduction

What I cannot create, I do not understand - Richard Feynman

essence

A directed acyclic computational graph builder, built from scratch on numpy and C, including auto-differentiation.

This was not just another deep learning library, its minimal code base was supposed to demonstrate how to:

  • Build neural net modules.
  • Put the modules together.
  • Efficiently compute gradients from this design.

Demos

  • mnist-mlp.py: Depth-2 multi layer perceptron, with ReLU and Dropout; 95.3% on MNIST.

  • lenet-bn.py: LeNet with Batch Normalization on first layer, 97% on MNIST.

  • lstm-embed.py: LSTM on word embeddings for Vietnamese Question classification + Dropout + L2 weight decay. 85% on test set and 98% on training set (overfit).

  • turing-copy.py: A neural turing machine with LSTM controller. Test result on copy task length 70:

img

  • visual-answer.py. Visual question answering with pretrained weight from VGG16 and a stack of 3 basic LSTMs, on Glove word2vec.

Q: What is the animal in the picture?      . A: cat
Q: Is there any person in the picture?     . A: no
Q: What is the cat doing?                  . A: sitting
Q: Where is the cat sitting on?            . A: floor
Q: What is the cat color?                  . A: white
Q: Is the cat smiling?                     . A: yes
  • dqn-cartpole.py: A classic solved with DQN, with experience replay and target network ofcourse. (Illustration below is one-take)

TODO: Memory network and GAN, for that I need to improve my speed of im2col and gemm for conv module first.

License

GPL 3.0 (see License in this repo)

essence's People

Contributors

thtrieu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.