Giter VIP home page Giter VIP logo

dldojo's Introduction

MIT License


My happy place to play around reimplementing the basic building blocks of deep learning in Numpy.

Includes:

  • All main activations (ReLU, Leaky ReLU, Linear, Sigmoid, Softmax)

  • A bunch of initializers (normal, uniform, ones, zeros, Glorot Normal/Uniform, He Normal/Uniform)

  • A bunch of optimizers (SGD, Momentum, Nesterov Momentum, Adagrad, RMSProp, Adam)

  • MSE, Binary Cross Entropy and Categorical Cross Entropy losses

  • Batch Normalization

  • Dropout

  • Gradient checking

  • L1 Regularization

  • MNIST prediction

  • Weight plotting

TODO and WIP:

  • Conv2D, DeConv and Pooling layers

  • RNN, LSTM and everything recurrent

  • Self-attention layer


What's this? A deep learning library written from scratch in pure Python and Numpy.

Is this the best possible way of implementing a neural network library? Definitely not

Couldn't you think of a better way of doing this? Yes, absolutely

Is this thing bug-free? Probably not, it's still very much WIP

Why didn't you do X instead? Either I didn't have the time, or I didn't think about it, or I didn't feel like it, or a mix of the three :)

Why didn't you implement a full autodiff library with computational graphs instead? Because I started implementing stuff and kept going until I felt like it, and then I didn't feel like refactoring the whole project. But I'd love to do it at some point in the future, if I ever have the time

So, what's the point of this project? Well, I learned a lot reimplementing all these things from scratch, and I had a lot of fun

Does it really work? Yes, it does!

Here's some of the things it can do...

Classify MNIST digits



Generate MNIST digits from a trained autoencoder



Visualise weights of a trained net




How do I run it?

Install the dependencies with:

pip install -r requirements.txt

There's a bunch of test functions in main.py - just comment out the ones you don't want to run, then run main.py

cd src && python main.py

dldojo's People

Contributors

smnai avatar

Watchers

 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.