Skip to content

Latest commit

 

History

History
141 lines (81 loc) · 6.34 KB

README.md

File metadata and controls

141 lines (81 loc) · 6.34 KB

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)

  4. Save & Restore (Notebook)

  5. Ensemble Learning (Notebook)

  6. CIFAR-10 (Notebook)

  7. Inception Model (Notebook)

  8. Transfer Learning (Notebook)

  9. Video Data (Notebook)

  10. Not available yet. Please support this issue on GitHub so we can get it done!

  11. Adversarial Examples (Notebook)

  12. Adversarial Noise for MNIST (Notebook)

  13. Visual Analysis (Notebook)

  14. DeepDream (Notebook)

  15. Style Transfer (Notebook)

Videos

These tutorials are also available as YouTube videos.

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.

Installation

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.

Requirements

These tutorials were developed on Linux using Python 3.5 (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!

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.

Example Setup

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

Some of these tutorials use scikit-learn which can be installed in your new conda environment as follows. This also installs NumPy and other dependencies:

conda install scikit-learn

You may also need to install other dependencies, such as:

conda install jupyter matplotlib scipy pillow

Now you have to install TensorFlow. It is now possible to install the CPU-version of TensorFlow directly using pip. We also need the PrettyTensor add-on package so we install that as well:

pip install tensorflow prettytensor

It is much more complicated to install the GPU-version because you also need various NVIDIA drivers. That is not described here.

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.

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.

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.