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:
- questions about python language
- questions about machine learning/deep learning
- questions about Nvidia GPU setup
- 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!
This document assumes you know:
- how to install Python
- how to run a Python code
- how to use pip to install packages
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 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:
- JetBrains offers educational discount. Check out their educational licenses and you can access almost all of their products.
- Guide for creating a python project
- Guide for configuring the virtualenv environment
- Guide for switching to scientific mode
This section will go through each tutorial in the tutorials in the TensorFlow website. I will keep updating this document like Q&A.
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()
In the section "Convert the integers back to words", the first review printed should have <START>
in the beginning.
seaborn
is library based on matplotlib
. So to show a plot created by seaborn
, we need to:
import matplotlib.pyplot as plt
- add
plt.show()
afterseaborn
creates a plot