Giter Club home page Giter Club logo

tsmc_dl's Introduction

TSMC_DL

TSMC course materials of deep learning.

Course slides

Prerequisite

Setup your python environment. We recommend to use python3.

sudo pip3 install -r requirements.txt

requirements.txt

Mixture Model

Use BMM or GMM to fit MNIST dataset (handwritten digits), and then use the trained model to perform classification tasks.

Demo_BMM.ipynb demos how to use Bernoalli mixture model.
Demo_GMM.ipynb demos how to use Gaussian mixture model.

Please refer to mixture.py, bmm.py, gmm.py for detailed implementations.

kmeans.py perform kmeans clustering on MNIST dataset.

python kmeans.py --path=[Path to MNIST dataset directory. Default to "../MNIST".]
                 --k=[Number of cluster center. Default to 10.]
                 --output=[File path to save cluster centers. Default to "kmeans.dat".]
                 --verbose=[True | False. Default to False.]

Note: Use python3 to run the code.

PCA and tSne for visualization

Neural network for MNIST and embedding visualization

How to start a tensorboard

In your code:

tf.summary.FileWriter('your path to log dir', ...)

tensorboard command:

tensorboard --logdir <your path to log dir> --port <your port (defalut:6006)>

In this notebook, we show how to train a neural network to do multiple-class classification in MNIST dataset. Since the url in tesorflow example is broken, please download the dataset from here.

Please change the data directory path to your own.

parser.add_argument('--data_dir', type=str, 
                    default='/home/tommy8054/pythonPlayground/MNIST_data/', # here!
                    help='Directory for storing input data')

Put your log files to desired directory.

parser.add_argument('--log_dir', type=str, 
                    default='/tmp/tensorflow/mnist/logs/mnist_with_summaries', # here!
                    help='Summaries log directory')

Show training detail or embedding visiualization. True for training detail and False for embedding visiualization.

parser.add_argument('--save_log', type=bool, default=False, # here!
                    help='Whether save log file or not')

Sparse Coding

Sparse coding using neural network

In this section, we demonstrate that sparsity constrain leads to sparse feature while training.

Denoising Autoencoder

Denoising Autoencoder

This is a simple example of denoising autoencoder on MNIST dataset. Pretrained weights are put in net_pretrained/dae

tsmc_dl's People

Contributors

htchen avatar roytseng-tw avatar tommy-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

babooppa6

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.