SlideShare a Scribd company logo
1 of 46
Download to read offline
>>> Deep Learning for
Developers
@aliostad
Ali Kheyrollahi, ASOS
@aliostad
: @aliostad
email: the same @gmail.com
http://byterot.blogspot.com
Ali Kheyrollahi,
Solutions Architect at ASOS
@aliostad
@aliostad
/// [meme alert!]
@aliostad
/// Agenda
> Building blocks of DL throughout history
> State of the art
> Programming Language detection using DL
from scratch using Keras/TensorFlow (achieving
98.7% accuracy)
@aliostad
/// Not covering
Deep Dream (reverse input)
GAN (General Adverserial Networks)
Monte Carlo Tree Search (MCTS)
LSTM
RNN
2012
AlexNet
2006-2010
BigData, ReLU,
GPU, weight
initialisation
1998
Gradient
Descent
1990
Convolutional
Networks
1986
Back-
propagation
@aliostad
1943
Neural
Networks
1958
Perceptron &
Training
F I R S T W I N T E R S E C O N D W I N T E R
/// Deep Learning history
@aliostad
/// the rebels
Warren McCulloch
Walter Pitts
Jerome Lettvin
@aliostad
/// friends and poets
@aliostad
/// McCulloch-Pitts (1943)
@aliostad
/// Wiener and rebels
Norbert Wiener
@aliostad
/// Pitts
“In no uncertain sense [he
was] the genius of the
group … when you asked
him a question, you would
get back a whole textbook”
Jerome Lettvin on Pitts
@aliostad
/// Wiener
Margaret Wiener
@aliostad
/// What the Frog (1959)
@aliostad
/// Frank Rosenblatt (1957-1962)
@aliostad
/// Perceptron
@aliostad
/// types of learning
> Supervised Learning (SL): eg digit recognition
> Unsupervised Learning (UL): eg clustering
> Reinforcement Learning (RL): eg game playing
@aliostad
/// Perceptron
from Sebastian Raschka’s blog
@aliostad
/// Perceptron
Activation
Function
x > 5 return 0
else return 1
Input (layer)
w1=2
w2=-1
w3=5
6
3
-2
6x2 + 3x-1 + -2x5 = -1
1
9
-1
-1
9x2 + -1x-1 + 1x5 = 24
0
@aliostad
/// Activation Function
ReLU (rectifier)
@aliostad
/// Minsky/Papert
(1969)
Marvin Minsky Seymour Papert
@aliostad
/// first ai winter (1969-1985)
XOR Fiasco
XOR Implementation
@aliostad
/// new surge: back-propagation (1986)
Geoffrey Hinton David Rumelhart
@aliostad
/// Hand-written letter recognition (1989)
Yann LeCun
@aliostad
/// Convolutional Neural Nets (1990)
ConvolutionLocally connected
(1998)
@aliostad
/// second ai winter (1992-2006)
@aliostad
/// 2nd Winter: Curse of Dimentionality
from Christopher Bishop’s
“Neural Networks for Pattern Recognition” (1995)
@aliostad
/// 2nd Winter: Feature extraction
from Christopher Bishop’s
“Neural Networks for Pattern Recognition” (1995)
@aliostad
/// 2nd Winter: Generalisation/Overfitting
from Christopher Bishop’s
“Neural Networks for Pattern Recognition” (1995)
@aliostad
/// Re-Cap problems
> Overfitting (deep networks would overfit)
> Trainings never converged (computation, weight decay)
> Human interaction still needed in feature engineering
> Curse of dimensionality (complexity, sparse dimensions)
> Support Vector Machine (SVM) much more practical
@aliostad
/// the new rebels
Yoshua Bengio
Yann LeCun,
Facebook
Geoff Hinton,
Google
Andrew Ng
Baidu (Google)
Canadian Mafia (CIFAR)
@aliostad
/// outcasts
Fifteen years ago, Yann LeCun was an outcast… remembers how
LeCun was relegated to the sidelines. “It was clear that he was an
outsider,” said Fergus. “He was talking about these methods.
Everyone was all, ‘Yann, yeah, we felt we had to invite him. These
models he’s talking about he’s been working on for years and
they’ve never really showed anything.
“Smart scientists go there to see their careers end.” Hinton’s lab
was seen as a renegade project, more the stuff of science fiction
than vocation.
from Welcome to the AI Conspiracy: The 'Canadian Mafia' Behind Tech's Latest Craze
https://www.recode.net/2015/7/15/11614684/ai-conspiracy-the-scientists-behind-deep-learning
@aliostad
/// outcasts
“In the late 90s and early 2000s, it was very very difficult to do
research in Neural Nets. In my own lab, I had to twist my students’
arm to do work on Neural Nets. They were afraid of seeing their
papers rejected because they were working on the subject, and
actually it did happen quite a bit for all the wrong reasons like ‘oh,
this is [neural nets]… we don’t do Neural Nets anymore’”.
Yoshua Bengio
from The History of Machine Learning from the Inside Out - Talking Machines Podcast, 26 Feb 2015
“In the 90s, other ML methods which were easier for a novice to
apply did as well or better than NN on many problems and interest
in them died. Three of us knew they would ultimately be the
answer. When we had better hardware, more data and slightly
better techniques, they took off again”.
Geoff Hinton
@aliostad
/// Revolution
> A fast learning algorithm for deep belief nets (2006)
Hinton, et al. - Boltzmann Machine (UL) for initialising weights
> Scaling Learning Algorithms towards AI (2007)
LeCun, et al.
> Large-scale Deep Unsupervised Learning using Graphics
Processors (2009) Hinton, et al. - Importance of GPU in training
> ReLU: Rectified Linear Units aka Rectifier (2010)
Hinton, et al. - LeCun, et al. - Bengio, et al. - Ng, et al.
> Gradient-based learning applied to Document Recognition (1998)
LeCun, Bengio, et al. - Convolutional networks, Gradient Descent
@aliostad
/// solutions to 2nd winter
> Overfitting: DropOut Layers
> Trainings never converged: GPU, initialisation of weights,
ReLU, Stochastic Gradient Descent with batching, pooling
> Human interaction still needed in feature engineering
> Curse of dimensionality: MOAR data!
@aliostad
/// State of the Art
> ImageNet 2013 winner (aka ZF Net):
Matthew Zeiler and Rob Fergus from NYU. error 11.2%
> ImageNet 2012 winner (aka AlexNet):
Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton (error 15.4% vs 26.2%)
> VGG Net 2014:
Karen Simonyan and Andrew Zisserman from Oxford. error 7.3%
> ImageNet 2014 winner (aka GoogLeNet):
Google. error 6.4%
> ImageNet 2015 winner (aka ResNet):
Microsoft Research Asia. error 3.6%
https://adeshpande3.github.io/adeshpande3.github.io/The-9-Deep-Learning-Papers-You-Need-To-Know-About.html
@aliostad
/// Future of DL research
> “Start from the beginning…” - Geoff Hinton
> Generally, Unsupervised Learning will be the focus:
GAN and auto-encoders,
https://adeshpande3.github.io/adeshpande3.github.io/The-9-Deep-Learning-Papers-You-Need-To-Know-About.html
@aliostad
/// Programming Language Detection
> Sample files collected from Github (2K per language)
> Keras on top of TensorFlow
> Trained on a GPU machine in Azure (8 hours on NC12)
> 16 programming languages
> Test on a different dataset (1K per language)
> Python (https://github.com/aliostad/deep-learning-lang-detection)
@aliostad
/// Programming Language Detection - approach
“Text Understanding from Scratch” April 2016
Xiang Zhang, Yann LeCun
Using quantised characters instead of words:
70 characters:
abcdefghijklmnopqrstuvwxyz0123456789-,;.!?:'/|_@#$%^&*~`+-=<>()[]{}"
0 0 0 0 0010000 0 0 0 0 0000000 0 0 0 0 0000000
i => …
@aliostad
/// Programming Language Detection -
Representation
[One-hot-vector]
“import numpy as np”
0 0 0 0 0010000 0 0 0 0 0000000 0 0 0 0 0000000
0 0 0 0 0000000 0 0 0 1 0000000 0 0 0 0 0000000
0 0 0 0 0000000 0 0 0 0 1000000 0 0 0 0 0000000
0 0 0 0 0000000 0 0 0 0 0100000 0 0 0 0 0000000
0 0 0 0 0000000 0 0 0 0 0000000 0 1 0 0 0000000
0 0 0 0 0000000 0 0 0 0 0000000 0 0 1 0 0000000
{“import”
{70
@aliostad
/// Programming Language Detection -
Network Architecture
CONV 1D
(3)
POOLING
CONV 1D
(5)
POOLING
CONV 1D
(9)
POOLING
CONV 1D
(19)
POOLING
CONCATENATE
DROPOUT
I N P U T
DENSE
DROPOUT
DENSE
SOFTMAX
O U T P U T
[ n_chars, char_dim ]
[ n_classes ]
I N C E P T I O N
@aliostad
12 3 8 4
11 9 7 2
3 5 2 6
8 6 10 5
222
10
8
7
222222222222
777777
2222
7777
222
7
8
2x2 Max-Pooling
12 8
8 10
/// Pooling
@aliostad
/// Programming Language Detection -
Layers
> Conv 1D: (using ReLU) finds local relationships (words, symbols)
> Pooling: Dimensionality reduction (anti-overfitting, anti-decay)
> Dense: Generalise to higher level concepts (functions, statements)
> Dropout: Masks input semi-randomly (anti-overfitting)
> Softmax: Turns scalar to probability using normalised exponential
@aliostad
/// C O D E
&
D E M O
@aliostad
/// Last words
@aliostad
Automatic real-time road marking recognition
John McSporran: Winter Picture
Researchgate: Convolution Picture
Perceptron Video
Hsiung: Lights Picture
Text classification using Convolutional Neural Networks (CNN)

More Related Content

Similar to Deep learning for developers - oredev

Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Ha Phuong
 
Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012c.titus.brown
 
CT Brown - Doing next-gen sequencing analysis in the cloud
CT Brown - Doing next-gen sequencing analysis in the cloudCT Brown - Doing next-gen sequencing analysis in the cloud
CT Brown - Doing next-gen sequencing analysis in the cloudJan Aerts
 
Interact your wearable and an iot device
Interact your wearable and an iot deviceInteract your wearable and an iot device
Interact your wearable and an iot deviceJeff Prestes
 
MLconf - Distributed Deep Learning for Classification and Regression Problems...
MLconf - Distributed Deep Learning for Classification and Regression Problems...MLconf - Distributed Deep Learning for Classification and Regression Problems...
MLconf - Distributed Deep Learning for Classification and Regression Problems...Sri Ambati
 
Ntegra 20231003 v3.pptx
Ntegra 20231003 v3.pptxNtegra 20231003 v3.pptx
Ntegra 20231003 v3.pptxISSIP
 
From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?Krist Wongsuphasawat
 
Our Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed FutureOur Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed FutureC4Media
 
許永真/Crowd Computing for Big and Deep AI
許永真/Crowd Computing for Big and Deep AI許永真/Crowd Computing for Big and Deep AI
許永真/Crowd Computing for Big and Deep AI台灣資料科學年會
 
Open Analytics Environment
Open Analytics EnvironmentOpen Analytics Environment
Open Analytics EnvironmentIan Foster
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Demi Ben-Ari
 
Technology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondTechnology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondJames Huang
 
Array computing and the evolution of SciPy, NumPy, and PyData
Array computing and the evolution of SciPy, NumPy, and PyDataArray computing and the evolution of SciPy, NumPy, and PyData
Array computing and the evolution of SciPy, NumPy, and PyDataTravis Oliphant
 
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxISSIP
 
Future Of Technology
Future Of  TechnologyFuture Of  Technology
Future Of TechnologyMelanie Swan
 
mini project report on visual writing.pptx
mini project report on visual writing.pptxmini project report on visual writing.pptx
mini project report on visual writing.pptxfreespace000xd
 

Similar to Deep learning for developers - oredev (20)

Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)
 
Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012
 
CT Brown - Doing next-gen sequencing analysis in the cloud
CT Brown - Doing next-gen sequencing analysis in the cloudCT Brown - Doing next-gen sequencing analysis in the cloud
CT Brown - Doing next-gen sequencing analysis in the cloud
 
Interact your wearable and an iot device
Interact your wearable and an iot deviceInteract your wearable and an iot device
Interact your wearable and an iot device
 
MLconf - Distributed Deep Learning for Classification and Regression Problems...
MLconf - Distributed Deep Learning for Classification and Regression Problems...MLconf - Distributed Deep Learning for Classification and Regression Problems...
MLconf - Distributed Deep Learning for Classification and Regression Problems...
 
Ntegra 20231003 v3.pptx
Ntegra 20231003 v3.pptxNtegra 20231003 v3.pptx
Ntegra 20231003 v3.pptx
 
From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?
 
Our Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed FutureOur Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed Future
 
許永真/Crowd Computing for Big and Deep AI
許永真/Crowd Computing for Big and Deep AI許永真/Crowd Computing for Big and Deep AI
許永真/Crowd Computing for Big and Deep AI
 
Microsoft Dryad
Microsoft DryadMicrosoft Dryad
Microsoft Dryad
 
Open Analytics Environment
Open Analytics EnvironmentOpen Analytics Environment
Open Analytics Environment
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"
 
Technology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and BeyondTechnology and AI sharing - From 2016 to Y2017 and Beyond
Technology and AI sharing - From 2016 to Y2017 and Beyond
 
Array computing and the evolution of SciPy, NumPy, and PyData
Array computing and the evolution of SciPy, NumPy, and PyDataArray computing and the evolution of SciPy, NumPy, and PyData
Array computing and the evolution of SciPy, NumPy, and PyData
 
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
 
Future Of Technology
Future Of  TechnologyFuture Of  Technology
Future Of Technology
 
mini project report on visual writing.pptx
mini project report on visual writing.pptxmini project report on visual writing.pptx
mini project report on visual writing.pptx
 
future-of-technology
future-of-technologyfuture-of-technology
future-of-technology
 
OVERVIEW OF ICT LAB RESEARCH
OVERVIEW OF ICT LAB RESEARCHOVERVIEW OF ICT LAB RESEARCH
OVERVIEW OF ICT LAB RESEARCH
 
CINET: A Cyber-Infrastructure for Network Science Overview
CINET: A Cyber-Infrastructure for Network Science OverviewCINET: A Cyber-Infrastructure for Network Science Overview
CINET: A Cyber-Infrastructure for Network Science Overview
 

More from Ali Kheyrollahi

Autonomous agents with deep reinforcement learning - Oredev 2018
Autonomous agents with deep reinforcement learning - Oredev 2018Autonomous agents with deep reinforcement learning - Oredev 2018
Autonomous agents with deep reinforcement learning - Oredev 2018Ali Kheyrollahi
 
Microservice Architecture at ASOS - DevSum 2017
Microservice Architecture at ASOS - DevSum 2017Microservice Architecture at ASOS - DevSum 2017
Microservice Architecture at ASOS - DevSum 2017Ali Kheyrollahi
 
5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techoramaAli Kheyrollahi
 
5 must-have patterns for your microservice - buildstuff
5 must-have patterns for your microservice - buildstuff5 must-have patterns for your microservice - buildstuff
5 must-have patterns for your microservice - buildstuffAli Kheyrollahi
 
From Power Chord to the Power of Models - Oredev
From Power Chord to the Power of Models - OredevFrom Power Chord to the Power of Models - Oredev
From Power Chord to the Power of Models - OredevAli Kheyrollahi
 
From Hard Science to Baseless Opinions - Oredev
From Hard Science to Baseless Opinions  - OredevFrom Hard Science to Baseless Opinions  - Oredev
From Hard Science to Baseless Opinions - OredevAli Kheyrollahi
 
5 must have patterns for your microservice
5 must have patterns for your microservice5 must have patterns for your microservice
5 must have patterns for your microserviceAli Kheyrollahi
 
From hard science to baseless opinions
From hard science to baseless opinionsFrom hard science to baseless opinions
From hard science to baseless opinionsAli Kheyrollahi
 
Microservice architecture at ASOS
Microservice architecture at ASOSMicroservice architecture at ASOS
Microservice architecture at ASOSAli Kheyrollahi
 
Us Elections 2016 - Iran Elections 2005
Us Elections 2016 - Iran Elections 2005Us Elections 2016 - Iran Elections 2005
Us Elections 2016 - Iran Elections 2005Ali Kheyrollahi
 
5 Anti-Patterns in Api Design - NDC London 2016
5 Anti-Patterns in Api Design - NDC London 20165 Anti-Patterns in Api Design - NDC London 2016
5 Anti-Patterns in Api Design - NDC London 2016Ali Kheyrollahi
 
From power chords to the power of models
From power chords to the power of modelsFrom power chords to the power of models
From power chords to the power of modelsAli Kheyrollahi
 
5 Anti-Patterns in Api Design - buildstuff
5 Anti-Patterns in Api Design - buildstuff5 Anti-Patterns in Api Design - buildstuff
5 Anti-Patterns in Api Design - buildstuffAli Kheyrollahi
 
5 Anti-Patterns in API Design - DDD East Anglia 2015
5 Anti-Patterns in API Design - DDD East Anglia 20155 Anti-Patterns in API Design - DDD East Anglia 2015
5 Anti-Patterns in API Design - DDD East Anglia 2015Ali Kheyrollahi
 
5 Anti-Patterns in API Design
5 Anti-Patterns in API Design5 Anti-Patterns in API Design
5 Anti-Patterns in API DesignAli Kheyrollahi
 
Topic Modelling and APIs
Topic Modelling and APIsTopic Modelling and APIs
Topic Modelling and APIsAli Kheyrollahi
 
Http caching 101 and a bit of CacheCow
Http caching 101 and a bit of CacheCowHttp caching 101 and a bit of CacheCow
Http caching 101 and a bit of CacheCowAli Kheyrollahi
 

More from Ali Kheyrollahi (17)

Autonomous agents with deep reinforcement learning - Oredev 2018
Autonomous agents with deep reinforcement learning - Oredev 2018Autonomous agents with deep reinforcement learning - Oredev 2018
Autonomous agents with deep reinforcement learning - Oredev 2018
 
Microservice Architecture at ASOS - DevSum 2017
Microservice Architecture at ASOS - DevSum 2017Microservice Architecture at ASOS - DevSum 2017
Microservice Architecture at ASOS - DevSum 2017
 
5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama5 must have patterns for your microservice - techorama
5 must have patterns for your microservice - techorama
 
5 must-have patterns for your microservice - buildstuff
5 must-have patterns for your microservice - buildstuff5 must-have patterns for your microservice - buildstuff
5 must-have patterns for your microservice - buildstuff
 
From Power Chord to the Power of Models - Oredev
From Power Chord to the Power of Models - OredevFrom Power Chord to the Power of Models - Oredev
From Power Chord to the Power of Models - Oredev
 
From Hard Science to Baseless Opinions - Oredev
From Hard Science to Baseless Opinions  - OredevFrom Hard Science to Baseless Opinions  - Oredev
From Hard Science to Baseless Opinions - Oredev
 
5 must have patterns for your microservice
5 must have patterns for your microservice5 must have patterns for your microservice
5 must have patterns for your microservice
 
From hard science to baseless opinions
From hard science to baseless opinionsFrom hard science to baseless opinions
From hard science to baseless opinions
 
Microservice architecture at ASOS
Microservice architecture at ASOSMicroservice architecture at ASOS
Microservice architecture at ASOS
 
Us Elections 2016 - Iran Elections 2005
Us Elections 2016 - Iran Elections 2005Us Elections 2016 - Iran Elections 2005
Us Elections 2016 - Iran Elections 2005
 
5 Anti-Patterns in Api Design - NDC London 2016
5 Anti-Patterns in Api Design - NDC London 20165 Anti-Patterns in Api Design - NDC London 2016
5 Anti-Patterns in Api Design - NDC London 2016
 
From power chords to the power of models
From power chords to the power of modelsFrom power chords to the power of models
From power chords to the power of models
 
5 Anti-Patterns in Api Design - buildstuff
5 Anti-Patterns in Api Design - buildstuff5 Anti-Patterns in Api Design - buildstuff
5 Anti-Patterns in Api Design - buildstuff
 
5 Anti-Patterns in API Design - DDD East Anglia 2015
5 Anti-Patterns in API Design - DDD East Anglia 20155 Anti-Patterns in API Design - DDD East Anglia 2015
5 Anti-Patterns in API Design - DDD East Anglia 2015
 
5 Anti-Patterns in API Design
5 Anti-Patterns in API Design5 Anti-Patterns in API Design
5 Anti-Patterns in API Design
 
Topic Modelling and APIs
Topic Modelling and APIsTopic Modelling and APIs
Topic Modelling and APIs
 
Http caching 101 and a bit of CacheCow
Http caching 101 and a bit of CacheCowHttp caching 101 and a bit of CacheCow
Http caching 101 and a bit of CacheCow
 

Recently uploaded

Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 

Recently uploaded (20)

Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 

Deep learning for developers - oredev

  • 1. >>> Deep Learning for Developers @aliostad Ali Kheyrollahi, ASOS
  • 2. @aliostad : @aliostad email: the same @gmail.com http://byterot.blogspot.com Ali Kheyrollahi, Solutions Architect at ASOS
  • 5. @aliostad /// Agenda > Building blocks of DL throughout history > State of the art > Programming Language detection using DL from scratch using Keras/TensorFlow (achieving 98.7% accuracy)
  • 6. @aliostad /// Not covering Deep Dream (reverse input) GAN (General Adverserial Networks) Monte Carlo Tree Search (MCTS) LSTM RNN
  • 8. @aliostad /// the rebels Warren McCulloch Walter Pitts Jerome Lettvin
  • 11. @aliostad /// Wiener and rebels Norbert Wiener
  • 12. @aliostad /// Pitts “In no uncertain sense [he was] the genius of the group … when you asked him a question, you would get back a whole textbook” Jerome Lettvin on Pitts
  • 14. @aliostad /// What the Frog (1959)
  • 17. @aliostad /// types of learning > Supervised Learning (SL): eg digit recognition > Unsupervised Learning (UL): eg clustering > Reinforcement Learning (RL): eg game playing
  • 19. @aliostad /// Perceptron Activation Function x > 5 return 0 else return 1 Input (layer) w1=2 w2=-1 w3=5 6 3 -2 6x2 + 3x-1 + -2x5 = -1 1 9 -1 -1 9x2 + -1x-1 + 1x5 = 24 0
  • 22. @aliostad /// first ai winter (1969-1985) XOR Fiasco XOR Implementation
  • 23. @aliostad /// new surge: back-propagation (1986) Geoffrey Hinton David Rumelhart
  • 24. @aliostad /// Hand-written letter recognition (1989) Yann LeCun
  • 25. @aliostad /// Convolutional Neural Nets (1990) ConvolutionLocally connected (1998)
  • 26. @aliostad /// second ai winter (1992-2006)
  • 27. @aliostad /// 2nd Winter: Curse of Dimentionality from Christopher Bishop’s “Neural Networks for Pattern Recognition” (1995)
  • 28. @aliostad /// 2nd Winter: Feature extraction from Christopher Bishop’s “Neural Networks for Pattern Recognition” (1995)
  • 29. @aliostad /// 2nd Winter: Generalisation/Overfitting from Christopher Bishop’s “Neural Networks for Pattern Recognition” (1995)
  • 30. @aliostad /// Re-Cap problems > Overfitting (deep networks would overfit) > Trainings never converged (computation, weight decay) > Human interaction still needed in feature engineering > Curse of dimensionality (complexity, sparse dimensions) > Support Vector Machine (SVM) much more practical
  • 31. @aliostad /// the new rebels Yoshua Bengio Yann LeCun, Facebook Geoff Hinton, Google Andrew Ng Baidu (Google) Canadian Mafia (CIFAR)
  • 32. @aliostad /// outcasts Fifteen years ago, Yann LeCun was an outcast… remembers how LeCun was relegated to the sidelines. “It was clear that he was an outsider,” said Fergus. “He was talking about these methods. Everyone was all, ‘Yann, yeah, we felt we had to invite him. These models he’s talking about he’s been working on for years and they’ve never really showed anything. “Smart scientists go there to see their careers end.” Hinton’s lab was seen as a renegade project, more the stuff of science fiction than vocation. from Welcome to the AI Conspiracy: The 'Canadian Mafia' Behind Tech's Latest Craze https://www.recode.net/2015/7/15/11614684/ai-conspiracy-the-scientists-behind-deep-learning
  • 33. @aliostad /// outcasts “In the late 90s and early 2000s, it was very very difficult to do research in Neural Nets. In my own lab, I had to twist my students’ arm to do work on Neural Nets. They were afraid of seeing their papers rejected because they were working on the subject, and actually it did happen quite a bit for all the wrong reasons like ‘oh, this is [neural nets]… we don’t do Neural Nets anymore’”. Yoshua Bengio from The History of Machine Learning from the Inside Out - Talking Machines Podcast, 26 Feb 2015 “In the 90s, other ML methods which were easier for a novice to apply did as well or better than NN on many problems and interest in them died. Three of us knew they would ultimately be the answer. When we had better hardware, more data and slightly better techniques, they took off again”. Geoff Hinton
  • 34. @aliostad /// Revolution > A fast learning algorithm for deep belief nets (2006) Hinton, et al. - Boltzmann Machine (UL) for initialising weights > Scaling Learning Algorithms towards AI (2007) LeCun, et al. > Large-scale Deep Unsupervised Learning using Graphics Processors (2009) Hinton, et al. - Importance of GPU in training > ReLU: Rectified Linear Units aka Rectifier (2010) Hinton, et al. - LeCun, et al. - Bengio, et al. - Ng, et al. > Gradient-based learning applied to Document Recognition (1998) LeCun, Bengio, et al. - Convolutional networks, Gradient Descent
  • 35. @aliostad /// solutions to 2nd winter > Overfitting: DropOut Layers > Trainings never converged: GPU, initialisation of weights, ReLU, Stochastic Gradient Descent with batching, pooling > Human interaction still needed in feature engineering > Curse of dimensionality: MOAR data!
  • 36. @aliostad /// State of the Art > ImageNet 2013 winner (aka ZF Net): Matthew Zeiler and Rob Fergus from NYU. error 11.2% > ImageNet 2012 winner (aka AlexNet): Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton (error 15.4% vs 26.2%) > VGG Net 2014: Karen Simonyan and Andrew Zisserman from Oxford. error 7.3% > ImageNet 2014 winner (aka GoogLeNet): Google. error 6.4% > ImageNet 2015 winner (aka ResNet): Microsoft Research Asia. error 3.6% https://adeshpande3.github.io/adeshpande3.github.io/The-9-Deep-Learning-Papers-You-Need-To-Know-About.html
  • 37. @aliostad /// Future of DL research > “Start from the beginning…” - Geoff Hinton > Generally, Unsupervised Learning will be the focus: GAN and auto-encoders, https://adeshpande3.github.io/adeshpande3.github.io/The-9-Deep-Learning-Papers-You-Need-To-Know-About.html
  • 38. @aliostad /// Programming Language Detection > Sample files collected from Github (2K per language) > Keras on top of TensorFlow > Trained on a GPU machine in Azure (8 hours on NC12) > 16 programming languages > Test on a different dataset (1K per language) > Python (https://github.com/aliostad/deep-learning-lang-detection)
  • 39. @aliostad /// Programming Language Detection - approach “Text Understanding from Scratch” April 2016 Xiang Zhang, Yann LeCun Using quantised characters instead of words: 70 characters: abcdefghijklmnopqrstuvwxyz0123456789-,;.!?:'/|_@#$%^&*~`+-=<>()[]{}" 0 0 0 0 0010000 0 0 0 0 0000000 0 0 0 0 0000000 i => …
  • 40. @aliostad /// Programming Language Detection - Representation [One-hot-vector] “import numpy as np” 0 0 0 0 0010000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 0 1 0000000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 0 0 1000000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 0 0 0100000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 0 0 0000000 0 1 0 0 0000000 0 0 0 0 0000000 0 0 0 0 0000000 0 0 1 0 0000000 {“import” {70
  • 41. @aliostad /// Programming Language Detection - Network Architecture CONV 1D (3) POOLING CONV 1D (5) POOLING CONV 1D (9) POOLING CONV 1D (19) POOLING CONCATENATE DROPOUT I N P U T DENSE DROPOUT DENSE SOFTMAX O U T P U T [ n_chars, char_dim ] [ n_classes ] I N C E P T I O N
  • 42. @aliostad 12 3 8 4 11 9 7 2 3 5 2 6 8 6 10 5 222 10 8 7 222222222222 777777 2222 7777 222 7 8 2x2 Max-Pooling 12 8 8 10 /// Pooling
  • 43. @aliostad /// Programming Language Detection - Layers > Conv 1D: (using ReLU) finds local relationships (words, symbols) > Pooling: Dimensionality reduction (anti-overfitting, anti-decay) > Dense: Generalise to higher level concepts (functions, statements) > Dropout: Masks input semi-randomly (anti-overfitting) > Softmax: Turns scalar to probability using normalised exponential
  • 44. @aliostad /// C O D E & D E M O
  • 46. @aliostad Automatic real-time road marking recognition John McSporran: Winter Picture Researchgate: Convolution Picture Perceptron Video Hsiung: Lights Picture Text classification using Convolutional Neural Networks (CNN)