|
1 | | -# TensorFlow-Tutorials |
| 1 | +# TensorFlow Tutorials |
2 | 2 |
|
3 | 3 | [Original repository on GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials) |
4 | 4 |
|
5 | | -## Contents |
| 5 | +Original author is [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org) |
| 6 | + |
| 7 | +## Introduction |
| 8 | + |
| 9 | +* These tutorials are intended for beginners in Deep Learning and TensorFlow. |
| 10 | +* Each tutorial covers a single topic. |
| 11 | +* The source-code is well-documented. |
| 12 | +* There is a [YouTube video](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ) for each tutorial. |
| 13 | + |
| 14 | +## Tutorials |
6 | 15 |
|
7 | 16 | 1. Simple Linear Model ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb)) |
8 | 17 |
|
|
18 | 27 |
|
19 | 28 | 7. Inception Model ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb)) |
20 | 29 |
|
| 30 | +8. Transfer Learning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb)) |
| 31 | + |
21 | 32 | ## Videos |
22 | 33 |
|
23 | | -These tutorials are also available as [YouTube Videos](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ). |
| 34 | +These tutorials are also available as [YouTube videos](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ). |
| 35 | + |
| 36 | +## Older Versions |
| 37 | + |
| 38 | +Sometimes the source-code has changed from that shown in the YouTube videos. This may be due to |
| 39 | +bug-fixes, improvements, or because code-sections are moved to separate files for easy re-use. |
| 40 | + |
| 41 | +If you want to see the exact versions of the source-code that were used in the YouTube videos, |
| 42 | +then you can [browse the history](https://github.com/Hvass-Labs/TensorFlow-Tutorials/commits/master) |
| 43 | +of commits to the GitHub repository. |
| 44 | + |
| 45 | +## Installation |
| 46 | + |
| 47 | +Some of the Python Notebooks use source-code located in different files to allow for easy re-use |
| 48 | +across multiple tutorials. It is therefore recommended that you download the whole repository |
| 49 | +from GitHub, instead of just downloading the individual Python Notebooks. |
| 50 | + |
| 51 | +### Git |
| 52 | + |
| 53 | +The easiest way to download and install these tutorials is by using git from the command-line: |
| 54 | + |
| 55 | + git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git |
| 56 | + |
| 57 | +This will create the directory `TensorFlow-Tutorials` and download all the files to it. |
| 58 | + |
| 59 | +This also makes it easy to update the tutorials, simply by executing this command inside that directory: |
| 60 | + |
| 61 | + git pull |
| 62 | + |
| 63 | +### Zip-File |
| 64 | + |
| 65 | +You can also [download](https://github.com/Hvass-Labs/TensorFlow-Tutorials/archive/master.zip) |
| 66 | +the contents of the GitHub repository as a Zip-file and extract it manually. |
| 67 | + |
| 68 | +## Requirements |
| 69 | + |
| 70 | +There are different ways of installing and running TensorFlow. This section describes how I did it |
| 71 | +for these tutorials. You may want to do it differently and you can search the internet for instructions. |
| 72 | + |
| 73 | +These tutorials were developed on Linux using [Anaconda](https://www.continuum.io/downloads) with Python 3.5 and [PyCharm](https://www.jetbrains.com/pycharm/). |
| 74 | + |
| 75 | +After installing Anaconda, you should create a [conda environment](http://conda.pydata.org/docs/using/envs.html) |
| 76 | +so you do not destroy your main installation in case you make a mistake somewhere: |
| 77 | + |
| 78 | + conda create --name tf python=3 |
| 79 | + |
| 80 | +Now you can switch to the new environment by running the following (on Linux): |
| 81 | + |
| 82 | + source activate tf |
| 83 | + |
| 84 | +Some of these tutorials use [scikit-learn](http://scikit-learn.org/stable/install.html) |
| 85 | +which can be installed in your new conda environment as follows. This also installs |
| 86 | +NumPy and other dependencies: |
| 87 | + |
| 88 | + conda install scikit-learn |
| 89 | + |
| 90 | +You may also need to install Jupyter Notebook and matplotlib: |
| 91 | + |
| 92 | + conda install jupyter matplotlib |
| 93 | + |
| 94 | +Now you have to install TensorFlow. This procedure might change in the future. At the time of this writing, |
| 95 | +the most recent TensorFlow version was 0.10.0. It comes in different builds depending on your needs. |
| 96 | +I need the Python 3.5 build for a Linux PC with only a CPU (no GPU). So I look at the [list of builds](https://www.tensorflow.org/versions/master/get_started/os_setup.html) |
| 97 | +and find the appropriate link which in my case is: |
| 98 | + |
| 99 | + pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl |
| 100 | + |
| 101 | +It is much more complicated to install the GPU-version because you also need various NVIDIA drivers. |
| 102 | +That is not described here. |
| 103 | + |
| 104 | +You should now be able to run the tutorials in the Python Notebooks: |
| 105 | + |
| 106 | + cd ~/development/TensorFlow-Tutorials/ # Your installation directory. |
| 107 | + jupyter notebook |
| 108 | + |
| 109 | +This should start a web-browser that shows the list of tutorials. Click on a tutorial to load it. |
| 110 | + |
| 111 | +If you are new to using Python and Linux, etc. then this may be challenging |
| 112 | +to get working and you may need to do internet searches for error-messages, etc. |
| 113 | +It will get easier with practice. |
| 114 | + |
| 115 | +## License (MIT) |
| 116 | + |
| 117 | +These tutorials and source-code are published under the [MIT License](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/LICENSE) |
| 118 | +which allows very broad use for both academic and commercial purposes. |
| 119 | + |
| 120 | +A few of the images used for demonstration purposes may be under copyright. These images are included under the "fair usage" laws. |
| 121 | + |
| 122 | +You are very welcome to modify these tutorials and use them in your own projects. |
| 123 | +Please keep a link to the [original repository](https://github.com/Hvass-Labs/TensorFlow-Tutorials). |
24 | 124 |
|
0 commit comments