Jupyter Notebook Python
Switch branches/tags
Nothing to show
Latest commit 1284750 Feb 9, 2018
Permalink
Failed to load latest commit information.
.github Updated issue template. May 3, 2017
images Added Tutorial 20 Feb 9, 2018
.gitignore Added Tutorial #15 Dec 9, 2016
01_Simple_Linear_Model.ipynb Minor fixes. Dec 14, 2017
02_Convolutional_Neural_Network.ipynb Minor fixes. Dec 14, 2017
03B_Layers_API.ipynb Added Tutorial #3-B. May 16, 2017
03C_Keras_API.ipynb Added Tutorial 03-C Dec 1, 2017
03_PrettyTensor.ipynb Tiny fix: Use num_classes in placeholder variables instead of 10. May 13, 2017
04_Save_Restore.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
05_Ensemble_Learning.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
06_CIFAR-10.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
07_Inception_Model.ipynb Changed the word rectangular with square. Jun 9, 2017
08_Transfer_Learning.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
09_Video_Data.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
10_Fine-Tuning.ipynb Added Tutorial 10 Dec 9, 2017
11_Adversarial_Examples.ipynb Fixed noise plot. Nov 8, 2016
12_Adversarial_Noise_MNIST.ipynb Fixed warnings, PrettyTensor API changes, etc. Dec 20, 2016
13B_Visual_Analysis_MNIST.ipynb Added Tutorial 13-B Sep 27, 2017
13_Visual_Analysis.ipynb Added Tutorial #13 Nov 11, 2016
14_DeepDream.ipynb Added Tutorial #14 Nov 24, 2016
15_Style_Transfer.ipynb Added Tutorial #15 Dec 9, 2016
16_Reinforcement_Learning.ipynb Tutorial 16, added note about compatibility issues. Jan 4, 2018
17_Estimator_API.ipynb Added Tutorial 17 Nov 20, 2017
18_TFRecords_Dataset_API.ipynb Added Tutorial 18 Nov 25, 2017
19_Hyper-Parameters.ipynb Added Tutorial 19 Jan 11, 2018
20_Natural_Language_Processing.ipynb Added Tutorial 20 Feb 9, 2018
LICENSE Minor changes. Jun 26, 2016
README.md Added Tutorial 20 Feb 9, 2018
cache.py Added Tutorial #9 Oct 7, 2016
cifar10.py Changed to use os.path.join() Oct 12, 2016
convert.py Added Tutorial #9 Oct 7, 2016
dataset.py Added Tutorial 10 Dec 9, 2017
download.py Added Tutorial #14 Nov 24, 2016
forks.md Fixed link. Oct 3, 2017
imdb.py Added Tutorial 20 Feb 9, 2018
inception.py Added Tutorial #11 Oct 27, 2016
inception5h.py Added Tutorial #14 Nov 24, 2016
knifey.py Added Tutorial 10 Dec 9, 2017
reinforcement_learning.py Added support for both tf.layers and PrettyTensor. May 15, 2017
requirements.txt Added Tutorial #16 Apr 21, 2017
vgg16.py Fixed problem with GPU Dec 15, 2016

README.md

TensorFlow Tutorials

Original repository on GitHub

Original author is Magnus Erik Hvass Pedersen

Introduction

  • These tutorials are intended for beginners in Deep Learning and TensorFlow.
  • Each tutorial covers a single topic.
  • The source-code is well-documented.
  • There is a YouTube video for each tutorial.

Tutorials

  1. Simple Linear Model (Notebook)

  2. Convolutional Neural Network (Notebook)

  3. Pretty Tensor (Notebook)

3-B. Layers API (Notebook)

3-C. Keras API (Notebook)

  1. Save & Restore (Notebook)

  2. Ensemble Learning (Notebook)

  3. CIFAR-10 (Notebook)

  4. Inception Model (Notebook)

  5. Transfer Learning (Notebook)

  6. Video Data (Notebook)

  7. Fine-Tuning (Notebook)

  8. Adversarial Examples (Notebook)

  9. Adversarial Noise for MNIST (Notebook)

  10. Visual Analysis (Notebook)

13-B. Visual Analysis for MNIST (Notebook)

  1. DeepDream (Notebook)

  2. Style Transfer (Notebook)

  3. Reinforcement Learning (Notebook)

  4. Estimator API (Notebook)

  5. TFRecords & Dataset API (Notebook)

  6. Hyper-Parameter Optimization (Notebook)

  7. Natural Language Processing (Notebook)

Videos

These tutorials are also available as YouTube videos.

Translations

These tutorials have been translated to the following languages:

You can help by translating the remaining tutorials or reviewing the ones that have already been translated. You can also help by translating to other languages.

Forks

See the selected list of forks for community modifications to these tutorials.

Downloading

Some of the Python Notebooks use source-code located in different files to allow for easy re-use across multiple tutorials. It is therefore recommended that you download the whole repository from GitHub, instead of just downloading the individual Python Notebooks.

Git

The easiest way to download and install these tutorials is by using git from the command-line:

git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git

This will create the directory TensorFlow-Tutorials and download all the files to it.

This also makes it easy to update the tutorials, simply by executing this command inside that directory:

git pull

Zip-File

You can also download the contents of the GitHub repository as a Zip-file and extract it manually.

Installation

There are different ways of installing and running TensorFlow. This section describes how I did it for these tutorials. You may want to do it differently and you can search the internet for instructions.

If you are new to using Python and Linux, etc. then this may be challenging to get working and you may need to do internet searches for error-messages, etc. It will get easier with practice.

Python Version 3.5 or Later

These tutorials were developed on Linux using Python 3.5 / 3.6 (the Anaconda distribution) and PyCharm.

There are reports that Python 2.7 gives error messages with these tutorials. Please make sure you are using Python 3.5 or later!

Environment

After installing Anaconda, you should create a conda environment so you do not destroy your main installation in case you make a mistake somewhere:

conda create --name tf python=3

Now you can switch to the new environment by running the following (on Linux):

source activate tf

Required Packages

The tutorials require several Python packages to be installed. The packages are listed in requirements.txt First you need to edit this file and select whether you want to install the CPU or GPU version of TensorFlow.

To install the required Python packages and dependencies you first have to activate the conda-environment as described above, and then you run the following command in a terminal:

pip install -r requirements.txt

Note that the GPU-version of TensorFlow also requires the installation of various NVIDIA drivers, which is not described here.

Testing

You should now be able to run the tutorials in the Python Notebooks:

cd ~/development/TensorFlow-Tutorials/  # Your installation directory.
jupyter notebook

This should start a web-browser that shows the list of tutorials. Click on a tutorial to load it.

Older Versions

Sometimes the source-code has changed from that shown in the YouTube videos. This may be due to bug-fixes, improvements, or because code-sections are moved to separate files for easy re-use.

If you want to see the exact versions of the source-code that were used in the YouTube videos, then you can browse the history of commits to the GitHub repository.

License (MIT)

These tutorials and source-code are published under the MIT License which allows very broad use for both academic and commercial purposes.

A few of the images used for demonstration purposes may be under copyright. These images are included under the "fair usage" laws.

You are very welcome to modify these tutorials and use them in your own projects. Please keep a link to the original repository.