Coding tutorial for robust machine learning algorithms for CS282R "Robust Machine Learning" taught at Harvard University in Spring 2018.
This workshop covers the fundamentals of TensorFlow. By the end of this workshop, you will be well equipped to start building your own neural network models in TensorFlow. The workshop will start by introducing concepts unique to TensorFlow, e.g. sessions, variables, optimizers. Later, we'll put these concepts together to build logistic regression, 3-layer NN, and finally, GAN.
The side theme of this workshop is writing clean, structured and well-documented code. ML code tends to get messy. This is especially the case in academic settings where we don't have a manager to review your code. We are also free from the pressure that our code will be used by millions of people. BUT, this never means that you can write sloppy code. The code should be nicely written so that you, three months from now, should be able to come back to the code and tell exactly what each function is doing.
That said, my code is not the best thing in the world. If you find any improvements, or errors in the code, please let me know. Pull requests are always welcome.
- Comfortability with Python
- Understanding of basic deep learning concepts.
- Fully charged laptop (so tat we don't run out of outlets).
- Install
TensorFlow
and other packages by following section 1. Run code in section 3 and make sure things run smoothly before class.
- Setup
- Introduction
- Graphs, Sessions
- Basic Operations
- Variables, Gradients, Placeholders
- Classification, Regression
- Visualization
- Multi-layer Perceptron
- GAN
- Adversarial Examples
Appendix: Articles, Papers on robust machine learning
When learning a new framework, it is better to move hands than to listen. So, we prepared quite a bit of programming exercises. You will work with your project partner on these exercises. Pair programming is extremely effective for being a better coder whether it be software or ML!
- Introduction to TensorFlow (section 1~6, 30 min)
- Pair Programming Exercises on Basics (section 1~6, 45 min)
- Break (10 min)
- Introduction to Deep Learning with TensorFlow (section 7~9, 30 min)
- Pair Programming Exercises on Deep Learning (section 7~9, 45 min)
Here are the list of things we will not cover but you might want to self-learn:
- Other Deep Learning models (e.g. RNN, CNN, VAE)
- Using GPUs
- Saving variables and graphs
- Testing your code
- Official Tutorial on handwritten digits (MNIST) classification
- Stanford CS20, TensorFlow for Deep Learning Research
- Stanford CS224d, Deep Learning for NLP
- Most popular TF code samples on GitHub
We want this repository to be a source of information related to robust machine learning. To do so, we need your help. In particular, you can send a pull request to this repository. For details, see this. Some types of contribution can be:
- Adding more models from our assigned papers to the tutorial.
- Adding papers/articles you found interesting to Papers.md, Articles.md.
- Fixing typos (always a good start if you're new to OSS).
Finally, don't forget to add your name below to give yourself a credit for the work you put in :)
Material created by: Kojin Oshiba, Jerry Anunrojwong.
Course taught by Professor Yaron Singer.