Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Euroscipy2017 #22

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
a64fd60
Updated Preamble and Conference Logo
May 5, 2017
03d1f30
Initial Repo refactoring
May 5, 2017
10864fb
trusted notebooks
leriomaggio May 5, 2017
9138179
Hidden repr layers and Embeddings
leriomaggio May 5, 2017
f70d5e0
removed old notebooks and added new ones - sections 4 and 5
leriomaggio May 5, 2017
8aca46b
added conv filter vix example
leriomaggio May 5, 2017
e8c5a10
refactored solutions
leriomaggio May 5, 2017
86e0660
refactored sections and removed junk
leriomaggio May 5, 2017
c842b2a
removed last junk
leriomaggio May 5, 2017
a39970a
removed add materials folder
leriomaggio May 5, 2017
00a438a
Removed unused files to light the repo
May 5, 2017
fe50d1b
Preamble outline
leriomaggio May 5, 2017
c12fda6
updated readme with actual outline and Theano Config instructions
leriomaggio May 7, 2017
1fcebc0
Slightly updated Theano installation instructions
leriomaggio May 7, 2017
7d71f45
updated outline description and reference to README for setting up th…
leriomaggio May 7, 2017
3a60f36
CNN Visualisation improved
leriomaggio May 10, 2017
fc4d73f
Refined CNN on Cifar + moved section on CNN weights in CNN Notebook. …
leriomaggio May 10, 2017
5a679e0
convlstm example
leriomaggio May 10, 2017
f534d6d
new run convlstm 20epochs
leriomaggio May 10, 2017
e7d0830
Added new notebook showing tf integration
leriomaggio May 10, 2017
faca3b0
Added integration with tf.Queue
leriomaggio May 10, 2017
96672b7
introduced ref. to functional API
leriomaggio May 10, 2017
688baf3
removed typo and refined references
leriomaggio May 10, 2017
27ef56e
updated deep-learning env on linux
leriomaggio May 10, 2017
30c69d7
updated osx conda env
May 10, 2017
cf16695
Tensorboard integration and improved examples with Conv AutoEncoder
leriomaggio May 10, 2017
5e5cd76
typo fixed on channels for convolutional filters
leriomaggio May 10, 2017
afdd64d
typo corrections
leriomaggio May 10, 2017
075ff85
trusted notebook now
leriomaggio May 10, 2017
55f1dbf
Merge branch 'pydatalondon2017' of github.com:leriomaggio/deep-learni…
leriomaggio May 10, 2017
c5c4204
removed unused files
leriomaggio May 10, 2017
f21efdc
added some text in the description of multi-model net example
leriomaggio May 10, 2017
ca74c42
completed the execution output for hyper-parameter opt with GridSearch
leriomaggio May 10, 2017
881031b
Added Conference Logo PyData LDN
leriomaggio May 10, 2017
b695de7
Logos on two lines in Head
leriomaggio May 10, 2017
1e3ee4a
Update README.md
leriomaggio Aug 22, 2017
199766f
Update 0. Preamble.ipynb
leriomaggio Aug 22, 2017
9b882bd
updated conference logo
Aug 28, 2017
032bd80
updated reference to repo tag
Aug 28, 2017
34974a8
unified conda environment for all platforms (Windows not tested)
Aug 28, 2017
a80ee36
slight downgrade of numpy version
Aug 28, 2017
9437b98
Updated installation instructions
Aug 29, 2017
09b74f7
added html version of README to be linked in the Preamble notebook
Aug 29, 2017
a05980a
Merge branch 'euroscipy2017' of github.com:leriomaggio/deep-learning-…
Aug 29, 2017
2febea9
some fix and changes to HTML
Aug 29, 2017
2860f86
updated preamble
Aug 29, 2017
8216d28
verified backend. Added notes on weights initialisation strategies
Aug 29, 2017
7dd1ee9
added few notes about input and output shapes
Aug 29, 2017
5e7ef85
removed solutions
Aug 29, 2017
6f17d51
reviewed MNIST Dataset exercises and added reference to Manifold lear…
Aug 29, 2017
af186bb
rerun for crosscheck
Aug 29, 2017
c35cfc2
completed with examples on images data generation
Aug 29, 2017
f63fe0e
additional details on BatchNorm and new Keras SELU networks
Aug 29, 2017
3509423
crosscheck and update
Aug 29, 2017
3ac1e16
moved reference to functional APIs
Aug 29, 2017
cc1db3b
fixed reference to Keras version for SELU
Aug 29, 2017
2e09f81
added tweets shots from fchollet about tf.keras
Aug 29, 2017
90a2b33
Merge branch 'euroscipy2017' of github.com:leriomaggio/deep-learning-…
Aug 29, 2017
0120cfb
Improved Transfer Learning and linked notebook fine tuning Deep nets
Aug 29, 2017
f13e1b0
verified and crosscheked
Aug 29, 2017
7f4178a
renamed solution to match notebook number
Aug 29, 2017
ed15fc8
rerun and verified
Aug 29, 2017
00f8009
Improved Tensorboard Integration
Aug 29, 2017
bc3a41f
rerun and check
Aug 29, 2017
ad79aea
updated notebook on autoencoders now including VAE
Aug 29, 2017
eba8045
updated path to img
Aug 29, 2017
4a7e98f
fixed typo for RNN
Aug 29, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 101 additions & 97 deletions 0. Preamble.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Deep Learning Tutorial with Keras and Tensorflow"
"# Ten Steps to Keras\n",
"\n",
"### Deep Learning Tutorial using Keras"
]
},
{
Expand All @@ -13,7 +15,11 @@
"source": [
"<div>\n",
" <img style=\"text-align: left\" src=\"imgs/keras-tensorflow-logo.jpg\" width=\"40%\" />\n",
"<div>"
"<div>\n",
"\n",
"<div>\n",
" <img style=\"text-align: left\" src=\"imgs/conference_logo.png\" width=\"40%\" alt=\"EuroScipy 2017 Logo\" />\n",
"</div>"
]
},
{
Expand All @@ -28,9 +34,21 @@
"metadata": {},
"source": [
"<img src=\"imgs/github.jpg\" />\n",
"\n",
"#### Right Now\n",
"\n",
"```shell\n",
"\n",
"git clone https://github.com/leriomaggio/deep-learning-keras-tensorflow.git -b euroscipy2017\n",
"```\n",
"\n",
"\n",
"#### Later\n",
"\n",
"```shell\n",
"\n",
"git clone https://github.com/leriomaggio/deep-learning-keras-tensorflow.git\n",
"git checkout tags/euroscipy2017\n",
"```"
]
},
Expand All @@ -43,75 +61,37 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"# Tentative Outline\n",
"\n",
"# Outline at a glance\n",
"\n",
"- **Part I**: **Introduction**\n",
"\n",
" - Intro to Deep Learning and ANN\n",
" - Perceptron and MLP \n",
"\t- naive pure-Python implementation\n",
" - fast forward, sgd, backprop\n",
" \n",
" - Intro to Tensorflow \n",
" - Model + SGD with Tensorflow\n",
" \n",
" - Introduction to Keras\n",
" - Overview and main features\n",
" - Keras Backend\n",
" - Overview of the `core` layers\n",
" - Multi-Layer Perceptron and Fully Connected\n",
" - Examples with `keras.models.Sequential` and `Dense`\n",
" - HandsOn: FC with keras\n",
" \n",
"- **Part II**: **Supervised Learning and Convolutional Neural Nets**\n",
" \n",
" - Intro: Focus on Image Classification\n",
"\n",
" - Intro to ConvNets\n",
" - meaning of convolutional filters\n",
" - examples from ImageNet \n",
" - Visualising ConvNets \n",
"\n",
" - Advanced CNN\n",
" - Dropout\n",
" - MaxPooling\n",
" - Batch Normalisation\n",
"\t\t\n",
" - HandsOn: MNIST Dataset\n",
" - FC and MNIST\n",
" - CNN and MNIST\n",
" \n",
" - Deep Convolutiona Neural Networks with Keras (ref: `keras.applications`)\n",
" - VGG16\n",
" - VGG19\n",
" - ResNet50\n",
" - Transfer Learning and FineTuning\n",
" - Hyperparameters Optimisation \n",
" \n",
"- **Part III**: **Unsupervised Learning**\n",
"\n",
" - AutoEncoders and Embeddings\n",
"\t- AutoEncoders and MNIST\n",
" \t- word2vec and doc2vec (gensim) with `keras.datasets`\n",
" - word2vec and CNN\n",
" \n",
"- **Part IV**: **Recurrent Neural Networks**\n",
" - Recurrent Neural Network in Keras \n",
" - `SimpleRNN`, `LSTM`, `GRU`\n",
"\t\t\n",
"- **PartV**: **Additional Materials**: \n",
" - Quick tutorial on `theano`\n",
" - Perceptron and Adaline (pure-python) implementations \n",
" - MLP and MNIST (pure-python)\n",
" - LSTM for Sentence Generation\n",
" - Custom Layers in Keras \n",
" - Multi modal Network Topologies with Keras"
"# Goal\n",
"\n",
"- **Introduce** main features of Keras APIs to build Neural Networks. \n",
"- **Learn** how to implement simple and complex Deep Neural Networks Architectures using Keras. \n",
"- **Discover** Keras Implementation and Internals.\n",
"\n",
"\n",
"- **Note**: examples and hands-on exercises will be provided along the way. This means that you should be able to run (almost) everything on your laptop without needing GPU(s). Even if, with GPUs code run faster :P"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"# Outline (in ten-ish Notebooks)\n",
"\n",
"1. _Multi-layer Fully Connected Networks (and the `backends`)_\n",
"2. _Hidden Layers features and Embeddings_\n",
"3. _Convolutional Networks_\n",
"4. _Hyperparameter Tuning_\n",
"5. _Cutsom Layers_\n",
"6. _Deep CNN and Residual Networks_\n",
"7. _Transfer Learning and Fine Tuning_\n",
"8. _Recurrent Neural Networks_\n",
"9. _AutoEncoders_\n",
"10. _Multi-Modal Networks_\n",
"\n",
"- - - -"
]
},
{
Expand All @@ -138,25 +118,39 @@
" - Python 3.4 should be fine as well\n",
" - likely Python 2.7 would be also fine, but *who knows*? :P\n",
" \n",
"- `numpy` version 1.10 or later: http://www.numpy.org/\n",
"- `scipy` version 0.16 or later: http://www.scipy.org/\n",
"- `matplotlib` version 1.4 or later: http://matplotlib.org/\n",
"- `pandas` version 0.16 or later: http://pandas.pydata.org\n",
"- `scikit-learn` version 0.15 or later: http://scikit-learn.org\n",
"- `keras` version 2.0 or later: http://keras.io\n",
"- `tensorflow` version 1.0 or later: https://www.tensorflow.org\n",
"- `ipython`/`jupyter` version 4.0 or later, with notebook support\n",
"\n",
"- `numpy` version >= 1.12: http://www.numpy.org/\n",
"- `scipy` version >= 0.19: http://www.scipy.org/\n",
"- `matplotlib` version >= 2.0: http://matplotlib.org/\n",
"- `pandas` version >= 0.19: http://pandas.pydata.org\n",
"- `scikit-learn` version >= 0.18: http://scikit-learn.org\n",
"- `keras` version >= 2.0: http://keras.io\n",
"- `tensorflow` version 1.2: https://www.tensorflow.org\n",
"- `ipython`/`jupyter` version >= 6.0, with notebook support\n",
"\n",
"(Optional but recommended):\n",
"\n",
"- `pyyaml`\n",
"- `hdf5` and `h5py` (required if you use model saving/loading functions in keras)\n",
"- **NVIDIA cuDNN** if you have NVIDIA GPUs on your machines.\n",
" [https://developer.nvidia.com/rdp/cudnn-download]()\n",
"\n",
"The easiest way to get (most) these is to use an all-in-one installer such as [Anaconda](http://www.continuum.io/downloads) from Continuum. These are available for multiple architectures."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setting up the Environment\n",
"\n",
"If you need support to setup and replicate the environment with all the required library, please\n",
"find all the step-by-step instructions in the [README.md](README.html) file.\n",
"\n",
"This repo ships with `.yml` files to replicate the Python Conda environment (on both Linux and OSX).\n",
"\n",
"Moreover, helpful tips on how to setup theano and tensorflow with GPU support are also provided"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -187,7 +181,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3.5.2\r\n"
"Python 3.5.4 :: Anaconda custom (64-bit)\r\n"
]
}
],
Expand Down Expand Up @@ -229,11 +223,11 @@
"output_type": "stream",
"text": [
"{\r\n",
"\t\"epsilon\": 1e-07,\r\n",
"\t\"backend\": \"tensorflow\",\r\n",
"\t\"floatx\": \"float32\",\r\n",
"\t\"image_data_format\": \"channels_last\"\r\n",
"}"
" \"image_data_format\": \"channels_last\",\r\n",
" \"epsilon\": 1e-07,\r\n",
" \"floatx\": \"float32\",\r\n",
" \"backend\": \"tensorflow\"\r\n",
"}\r\n"
]
}
],
Expand Down Expand Up @@ -265,7 +259,9 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -308,11 +304,11 @@
"name": "stdout",
"output_type": "stream",
"text": [
"numpy: 1.11.1\n",
"scipy: 0.18.0\n",
"matplotlib: 1.5.2\n",
"iPython: 5.1.0\n",
"scikit-learn: 0.18\n"
"numpy: 1.12.1\n",
"scipy: 0.19.1\n",
"matplotlib: 2.0.2\n",
"iPython: 6.1.0\n",
"scikit-learn: 0.19.0\n"
]
}
],
Expand Down Expand Up @@ -342,9 +338,17 @@
"name": "stdout",
"output_type": "stream",
"text": [
"keras: 2.0.2\n",
"Theano: 0.9.0\n",
"Tensorflow: 1.0.1\n"
"keras: 2.0.8\n",
"Theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291\n",
"TensorFlow: 1.2.1\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using cuDNN version 5110 on context None\n",
"Mapped name None to device cuda0: Tesla K80 (FC0D:00:00.0)\n"
]
}
],
Expand All @@ -357,7 +361,7 @@
"print('Theano: ', theano.__version__)\n",
"\n",
"import tensorflow as tf\n",
"print('Tensorflow: ', tf.__version__)"
"print('TensorFlow: ', tf.__version__)"
]
},
{
Expand All @@ -379,7 +383,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [default]",
"language": "python",
"name": "python3"
},
Expand All @@ -393,7 +397,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
"version": "3.5.4"
}
},
"nbformat": 4,
Expand Down
Loading