Git Product home page Git Product logo

mydeeplearning's Introduction

MyDeepLearning

Repo Intro

This repo is to construct a DL library for learning and testing some classic projects that include:

1, CNN, RNN(LSTM) model in pure Numpy, with all BP gradients calculation included.

2, Some classic model in tensorflow, including ResNet, SqueezeNet and more.

3, Some classic project scripts including Image Captioning, Image Fooling, Deep Dream, style transfer and more.

4, Image Localization, Dectection and Segmentation using Fast(er) R-CNN. (Coming very soon)

5, Multiple GAN(DCGAN, LSGAN, WGAN and more) implementation in Tensorflow.

6, Q-Learning implementation in Numpy and Gym. (Coming very soon)

File structure

All files in root directory represent a mini project, introduced in the section below. All files in lib has been covered by these mini projects.

--lib

  -- classifiers
    "all classifier models in both pure numpy or tensorflow"

  -- solvers
     "Trainer for both TF and pure numpy model"

  -- layers
     "layers for pure numpy model"

  -- utils
     "some assistant files"

  -- datasets
     "CIFAR-1O, MNIST dataset"

Mini projects

The projects is listed here in a recommended reading sequence:

PART I: pure Numpy project

1, LinearClassifier.py

It uses lib/model/linear_classifier.py to construct a linear classifer model to classify CIFAR-10 images. It's implemented in pure Numpy.

3, FCN.py

It uses lib/model/fc_net.py to construct a fully connected neural network model to classify CIFAR-10 images. It's implemented in pure Numpy.

FCN Relevant blog(In Chinese)

2, ThreeLayerCNN.py

It uses lib/model/cnn.py to construct a cnn model to classify CIFAR-10 images. It's implemented in pure Numpy.

CNN Relevant blog(In Chinese)

4, ImageCaptioning.py

It uses lib/model/rnn.py to contruct a vanilla rnn or lstm model to construct image captioning for microsoft coco data, the input feature is not from a CNN but from dataset directly. It's implemented in pure Numpy.

Image Captioning Relevant blog(In Chinese)

PART II: Tensorflow project

5, TFCNN.py

It build and test a CNN classifer in tensorflow.

6, SaliencyMap.py

It uses lib/model/squeezeNet.py with well trained parameters to show the saliencymap of images in CIFAR-10.

7, DeepDream.py

It uses lib/model/squeezeNet.py with well trained parameters to construct deepdream images based on images in CIFAR-10, for details about deepdream, please refer to the official github repo: https://github.com/google/deepdream

8, ImageFooling.py

It construct a model that fool well-trained squeezenet to label an image with wrong label.

Please check this blog for details of these 3 prjects above:

Saliency Map/DeepDream/ImageFooling Relevant Blog(In Chinese)

9, StyleTransfer.py

It uses lib/model/squeezeNet.py with well trained parameters to extract features from both content and style image to construct a new content image with style image style.

Style Transfer Relevant Blog(In Chinese)

10. TFGAN.py

It implemented DCGAN and WGAN in tensorflow to generate images based on both MNIST and CIFAR-10.

GAN relevant blog(In Chinese)

How to use

1, Download the repo to local, a star to the repo is appreciated.

2, make sure Python3 is installled in your local env, a virtual env is recommended.

3, pip3 install -r requirements

4, go to lib/datasets, manually run get_datasets.sh and get_3rd_data.sh to download dataset to local.

5, feel free to run any project under root.

More to do

I will upload the following extra models and projects in very recent time.

[] DQN

[] RCNN Family

[] ResNet

[] Policy Gradient(Reenforcement learning)

[] VAE(Generative model)

Special Thanks

This repo is heavily referenced with the assignment of Stanford cs231n. Special thanks to the great staff who give us such a great online course materials.

Course link: http://cs231n.stanford.edu/

Contact Me

Email: [email protected]

Twitter: https://twitter.com/nick_fandingwei

For Chinese user, zhihu is the fastest way to get response from me: https://www.zhihu.com/people/NickWey

You can also check my tech blog for more: http://nickiwei.github.io/

Consider to follow me on Zhihu, Twitter and Github, thanks!

mydeeplearning's People

Contributors

nick6918 avatar

Stargazers

b0g 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.