Skip to content

sjiang1/dllc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A TensorFlow and Deep Learning Tutorial for Beginners

This document is for undergrad/master students who are interested in learning deep learning (and TensorFlow) but are not necessarily familiar with machine learning concepts. I will keep updating this document like a small guide and a Q&A site, which are supplementary for the official TensorFlow Tutorials.

All questions are welcome! Including but not limited to:

  1. questions about python language
  2. questions about machine learning/deep learning
  3. questions about Nvidia GPU setup
  4. questions about TensorFlow and related libraries

I may not know all the answers but the gist of this document is for us to learn together!

Siyuan
01/02/2019

Prerequisites

This document assumes you know:

  1. how to install Python
  2. how to run a Python code
  3. how to use pip to install packages

Environment Setup

Install TensorFlow with pip

TensorFlow Official Installation Guide

For beginners who currently don't have a GPU, installing TensorFlow for CPU is a good choice. You don't need a GPU to start using TensorFlow. Actually, CPU-only version is recommended for beginners.

For students who have GPU at hand (I hope it's an Nvidia), I recommend the GPU version. CUDA needs to be installed before the GPU version of TensorFlow. Installing CUDA, cuDNN, is another story (to be told in the future/upon request.) If you want to install CUDA, make sure to check the CUDA version that TensorFlow supports. For example, the current stable TensorFlow (1.12 version) supports only CUDA 9.0 not CUDA 10.0.

PyCharm (optional)

PyCharm is a Python IDE offered by JetBrains. If you just started learning Python, I don't recommend using this IDE (and you can skip this section). But if you are already familiar with Python, this IDE can increase your productivity by highlighting your errors and autocompleting your code. A few extra notes:

  1. JetBrains offers educational discount. Check out their educational licenses and you can access almost all of their products.
  2. Guide for creating a python project
  3. Guide for configuring the virtualenv environment
  4. Guide for switching to scientific mode

Walkthrough the TensorFlow tutorials:

This section will go through each tutorial in the tutorials in the TensorFlow website. I will keep updating this document like Q&A.

Tutorial 01: Train your first neural network: basic classification

Note 1: how to show a plot

If you are not familiar with plotting in Python (like me), the following code in this tutorial does not print the plot as expected. (Note that in the tutorial, we already import matplotlib.pyplot as plt)

plt.figure()
plt.imshow(train_images[0])
plt.colorbar()
plt.grid(False)

The code above just renders the plot but not show the plot. To show the plot, add the following line after the above code:

plt.show()
Questions
For students to add questions here.

Tutorial 02: Text classification with movie reviews

Note 1: every review should start with <START>

In the section "Convert the integers back to words", the first review printed should have <START> in the beginning.

Questions
For students to add questions here.

Tutorial 03: Regression: predict fuel efficiency

Note 1: show the plot created by seaborn

seaborn is library based on matplotlib. So to show a plot created by seaborn, we need to:

  1. import matplotlib.pyplot as plt
  2. add plt.show() after seaborn creates a plot
Questions
For students to add questions here.

About

Deep Learning - Learning Community

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published