This repo contains workshop notes and code from a deep learning seminar series, first presented as the Practical Deep Learning Series with the Toronto Data Literacy Group.
A presentation of this workshop was also livestreamed from the Montreal Neurological Institute Brain Imaging Centre. The video (8 hours, uncut) is available here (free registration required).
Session 1 discuses background theory for artificial neural networks (ANNs), deep learning, and computation graph based libraries, particularly Google's TensorFlow.
Session 2 introduces the ANNs covered in session 1 in the form of TensorFlow code.
Session 3 covers convolutional networks
Session 4 and 5 are under development, but cover fully convolutional networks and autoencoders, respectively.
INSTALLATION
Prerequisites:
If you are using Linux, make sure you have a compiler toolchain installed (e.g. gcc). Generally Linux distributions come with this installed by default.
If on OS X, you will need the developer tools from Apple installed. If you're on a recent version of OS X (El Capitan +) you can install just the command line tools by following the instructions at http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/.
If you're using Windows, you will also need to install gcc. The easiest way to do this is probably to get the Anaconda Python distribution from https://anaconda.org/anaconda/python. If you're using Anaconda, replace "pip install" with "conda install" in the following instructions. If you have difficulty installing TensorFlow with conda, try pip install instead.
Installation instructions:
-
If you do not already have a copy of python 3.6+, install it from python.org or your Linux distribution's package manager.
-
Download or clone this repository
-
From the main directory (the one with 1_Introduction, 2_Perceptron, etc.) type:
pip install -e tfs
This command should install the code for this workshop plus the dependencies numpy and matplotlib. The -e is optional, but installs the package with links so that if you update your github clone it will automatically update the installed module as well. Tensorflow is NOT installed as a dependency in this step because it is not available through pip for all systems.
-
Install tensorflow by following the platform specific instructions for your system at https://www.tensorflow.org/install/. Note that if you are using a Mac, pip install tensorflow will not work... you will have to use the alternate method.
-
if you change into the directory 2_Perceptron and type:
python perceptronMNIST.py
you should see a series of lines printed similar to "Accuracy at step 100: train: 0.77999997139".
The CC-BY-ND license applies to the workshop notes only, not the code. The code is licensed under the MIT three-clause license (included here at in each source file) where applicable. The code in the file "input_data.py" found in Session1 is redistributed verbatim from Google's TensorFlow tutorial where it appears to be unlicensed. This code appears to originate with Yann LeCun.
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.
The MIT License (MIT)
Copyright (c) 2015 Robert A. Brown (Github)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.