SlideShare a Scribd company logo
1 of 79
Deep Learning
Rouyun Pan
Outline
• Neural Networks

• Regression and Classification

• Deep Learning 

• Convolution neural network
2
The concept of learning 

in a ML system
• Learning = Improving with experience at some task

• Improve over task T,

• With respect to performance measure, P

• Based on experience, E.
Deep learning
CNN, RNN, LSTM ...
Machine learning
NN, SVM, DT ...
A.I.
3
Case:

Housing Price Prediction
4
Housing Price Prediction
5
Housing Price Prediction
6
Housing Price Prediction
Size
#the rooms
Zip code
View
family size
traffic
life quality
Predicted price
7
Basic neuron network
x1
Y'
x3
x4
x2
Input layer Hidden layer Output layer
8
Basic neuron network
x1
Y'
x3
x4
x2
Input layer Hidden layer Output layer
Many Weighted Sum
9
http://www.asimovinstitute.org/neural-network-zoo/
10
Learning Strategy
• Supervised learning

• Unsupervised learning

• Reinforcement learning
11
Supervised learning
• These're training data set and already know what correct
output.

• The regression problem: 

Predicting results within a continuous output

• The classification problem: 

Predicting results in a discrete output
12
Application
Input (X) Output (X) Application
House size Prices estate
AD types, User info. Click on AD Online Advertising
Image Object (1,…,1000) Photo tagging
Audio Text transcript Speech recognition
Model
standard
NN
CNN
RNN
English Chinese Machine translation
Image, Radar info Position of the cars Autonomous driving
Customized 

hybrid
13
Unsupervised learning
• The data have no target attribute.

• Analyze data, look for patterns and clustering
14
Reinforcement learning
• The agent take actions in an environment 

so as to maximize some notion of cumulative reward.
15
The workflow 

for Supervised learning
Feature 

Extraction
Train 

the model
Eval

the model
Feature 

Extraction Predict
Model
Label
Label
Model
Data
New data
• Training phase
• predicting phase
16
How to train a model
• Training data set.

• The layers and neurons

• Hypothesis / Activation function

• Cost / Loss Function 

• Optimization algorithm
17
Linear regression
18
Training dataset
19
How to choose parameters
*Choose so that is close to y for our training example (x, y)
20
Cost function
It's to quantify the gap between network outputs and actual values
mean squared error method
•
21
Cost function (conti.)
22
Calculate the cost
23
Calculate the cost
24
25
Calculate the cost
Cost function (conti.)
26
The plot for cost function
27
Find the best weights to
minimize the loss
800
- 0.12
28
Find the best weights to
minimize the loss
360
29
Find the best weights to
minimize the loss
100
0.12
30
Optimization algorithm
Gradient Descent:

A iterative optimization algorithm for finding the minimum of a function

•
* one epoch = one pass of all the training examples
31
Gradient Descent
>= 0
< 0
32
Learning rate
33
Learning rate
• ... , 0.001, 0.003, 0.01, 0.03, 0.1, 0.3. 1...
34
Local minimum
Local minimum
Global minimum
35
Local minimum
is local minimum
= 0
36
Momentum
Momentum
Movement
Movement = + Momentum
Negative of
Negative of
37
Mini-Batch optimization
• Mini-batch optimization has the following advantages.

• Reduce the memory usage.

• Avoid being trapped in the local minima with the random m
*Batch size = the number of training examples in one pass
Iterations = number of passes, each pass using [batch size] of examples
38
Back propagation (BP)
x1
predicted Y
x3
x4
x2
Input layer Hidden layer Output layer
Y ; Label
update ...
39
Feature scaling
40
Mean Normalization
• Make sure gradient descent is working properly
41
Make sure gradient descent
is working properly
•
•
42
Under/Overfitting
Overfitting - high varianceUnderfitting - high bias Sweet spot
Train error
Test error
Train error
Test error
43
Avoid Overfitting
• Reduce number of features 

• Add more training data.

• Regularization

• Dropout
44
Regularization
• Keep all the features, but reduce the magnitude of parameters.
45
Dropout
• Instead of using all neurons, "dropout" some randomly

(usually 0.5 probability)
46
Classification
•
•
•
47
Classification
48
Classification
49
Classification
50
Logistic Regression
Want
Sigmoid Function (Logistic Function)
•
51
Logistic Regression

Cost function
non- convex
52
Logistic Regression 

Cost function
53
Cost Function & Gradient Descent
• Cost function - Log loss (Cross-entropy) for sigmoid function
• Gradient Descent
54
DL Frameworks
https://en.wikipedia.org/wiki/Comparison_of_deep_learning_software
55
Deep learning (DL)
56
Why is DL Hot Now?
57
ImageNet Challenge
58
GPU Usage for ImageNet
59
Image Classification Task
60
Convolutional 

Neural Network (CNN)
61
CNN
*Fully connected neural network *Locally connected neural network
62
CNN
*Share the weight across hidden units
63
CNN
64
Convolution
65
Visualization of Modulation
Ref: Visualizing Higher-Layer Features of a Deep Network
66
Alexnet
• A large, deep convolutional neural network (8 layers) to classify in the
training set into the 1000 different classes. 

• On the test data, It achieved top-1 and top-5 error rates of 39.7% and
18.9%
Convolutional layers Fully-connected
CONV Layers: 5 

Fully Connected Layers: 3 

Weights: 61M 

MACs: 724M
67
Alexnet
• Trained the network with 2 GPUs on ImageNet data, which contained
over 1.2 million annotated images from a total of over 1000 categories.

• Used ReLU for the nonlinearity functions (Found to decrease training
time as ReLUs are several times faster than the conventional tanh
function).

• Used data augmentation techniques that consisted of image
translations, horizontal reflections, and patch extractions.

• Implemented dropout layers in order to combat the problem of
overfitting to the training data.

• Trained the model using batch stochastic gradient descent, with specific
values for momentum and weight decay.
68
GPU & Big data
• Trained on two GTX 580 GPUs for five to six days.
69
Data augmentation
• It consisted of image translations, horizontal reflections,
and patch extractions.
70
Rectified Linear Unit (Relu)
71
Relu function
• The nonlinearity functions that be found to decrease
training time as ReLUs are several times faster than the
conventional tanh function
Relu
tanh
72
Polling
• Reduce resolution of each channel independently

• Increase translation-invariance and noise-resilience
73
Local response
normalization (LRN)
• Tries to mimic the inhibition scheme in the brain
74
Dropout
• Avoid overfitting in FC layer.
75
Revolution of Depth
http://icml.cc/2016/tutorials/icml2016_tutorial_deep_residual_networks_kaiminghe.pdf
76
CNN comparison
77
Demo
• Tensorflow playground

http://playground.tensorflow.org/

• ConvNetJS CIFAR-10 demo

http://cs.stanford.edu/people/karpathy/convnetjs/demo/cifar10.html
Resource
• Deep learningon on Coursera, Andrew Ng, Stanford University

https://www.coursera.org/specializations/deep-learning

• Deep Learning on MOOC

https://www.udacity.com/course/deep-learning--ud730

• Machine Learning Foundations, HT Lin, National Taiwan University

https://www.coursera.org/learn/ntumlone-mathematicalfoundations/

• TensorFlow

https://www.tensorflow.org/

• cnn-benchmarks

https://github.com/jcjohnson/cnn-benchmarks

More Related Content

What's hot

What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
Simplilearn
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Simplilearn
 
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Simplilearn
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
milad abbasi
 
Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
PyData
 

What's hot (20)

Autoencoders
AutoencodersAutoencoders
Autoencoders
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
 
Intro to Neural Networks
Intro to Neural NetworksIntro to Neural Networks
Intro to Neural Networks
 
Cnn method
Cnn methodCnn method
Cnn method
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep Learning
 
Introduction to Deep learning
Introduction to Deep learningIntroduction to Deep learning
Introduction to Deep learning
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
 
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
 
Introduction Of Artificial neural network
Introduction Of Artificial neural networkIntroduction Of Artificial neural network
Introduction Of Artificial neural network
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Transfer Learning
Transfer LearningTransfer Learning
Transfer Learning
 
Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural Network
 
Deep Belief Networks
Deep Belief NetworksDeep Belief Networks
Deep Belief Networks
 
CNN Algorithm
CNN AlgorithmCNN Algorithm
CNN Algorithm
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
 
2.5 backpropagation
2.5 backpropagation2.5 backpropagation
2.5 backpropagation
 
MobileNet V3
MobileNet V3MobileNet V3
MobileNet V3
 
Deep learning
Deep learning Deep learning
Deep learning
 
Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
 

Similar to Deep learning

Similar to Deep learning (20)

An Introduction to Deep Learning
An Introduction to Deep LearningAn Introduction to Deep Learning
An Introduction to Deep Learning
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
 
Facial Emotion Detection on Children's Emotional Face
Facial Emotion Detection on Children's Emotional FaceFacial Emotion Detection on Children's Emotional Face
Facial Emotion Detection on Children's Emotional Face
 
Neural Networks in Data Mining - “An Overview”
Neural Networks  in Data Mining -   “An Overview”Neural Networks  in Data Mining -   “An Overview”
Neural Networks in Data Mining - “An Overview”
 
Techniques in Deep Learning
Techniques in Deep LearningTechniques in Deep Learning
Techniques in Deep Learning
 
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
Hands on machine learning with scikit-learn and tensor flow by ahmed yousryHands on machine learning with scikit-learn and tensor flow by ahmed yousry
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
 
Multilayer Perceptron - Elisa Sayrol - UPC Barcelona 2018
Multilayer Perceptron - Elisa Sayrol - UPC Barcelona 2018Multilayer Perceptron - Elisa Sayrol - UPC Barcelona 2018
Multilayer Perceptron - Elisa Sayrol - UPC Barcelona 2018
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlow
 
Cvpr 2018 papers review (efficient computing)
Cvpr 2018 papers review (efficient computing)Cvpr 2018 papers review (efficient computing)
Cvpr 2018 papers review (efficient computing)
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
 
Teach a neural network to read handwriting
Teach a neural network to read handwritingTeach a neural network to read handwriting
Teach a neural network to read handwriting
 
Neural network basic and introduction of Deep learning
Neural network basic and introduction of Deep learningNeural network basic and introduction of Deep learning
Neural network basic and introduction of Deep learning
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI TechnologiesAI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
 
Computer Design Concepts for Machine Learning
Computer Design Concepts for Machine LearningComputer Design Concepts for Machine Learning
Computer Design Concepts for Machine Learning
 
Neural Network Part-2
Neural Network Part-2Neural Network Part-2
Neural Network Part-2
 
Waste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptxWaste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptx
 
DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
 
Integer quantization for deep learning inference: principles and empirical ev...
Integer quantization for deep learning inference: principles and empirical ev...Integer quantization for deep learning inference: principles and empirical ev...
Integer quantization for deep learning inference: principles and empirical ev...
 

More from Rouyun Pan

Android 待機與操作耗電檢查
Android 待機與操作耗電檢查Android 待機與操作耗電檢查
Android 待機與操作耗電檢查
Rouyun Pan
 
Analyzing Display and Performance with Systrace
Analyzing Display and Performance with SystraceAnalyzing Display and Performance with Systrace
Analyzing Display and Performance with Systrace
Rouyun Pan
 

More from Rouyun Pan (20)

調色筆記
調色筆記調色筆記
調色筆記
 
有點硬又不會太硬的DNN加速器
有點硬又不會太硬的DNN加速器有點硬又不會太硬的DNN加速器
有點硬又不會太硬的DNN加速器
 
深度學習工作流程
深度學習工作流程深度學習工作流程
深度學習工作流程
 
Tensorflow lite for microcontroller
Tensorflow lite for microcontrollerTensorflow lite for microcontroller
Tensorflow lite for microcontroller
 
Google edge tpu
Google edge tpuGoogle edge tpu
Google edge tpu
 
用Adobe Camera raw 進行膚色校正
用Adobe Camera raw 進行膚色校正用Adobe Camera raw 進行膚色校正
用Adobe Camera raw 進行膚色校正
 
給攝影師的古典藝術構圖
給攝影師的古典藝術構圖給攝影師的古典藝術構圖
給攝影師的古典藝術構圖
 
照片直方圖解析
照片直方圖解析照片直方圖解析
照片直方圖解析
 
Deep Learning Hardware: Past, Present, & Future
Deep Learning Hardware: Past, Present, & FutureDeep Learning Hardware: Past, Present, & Future
Deep Learning Hardware: Past, Present, & Future
 
VR解密
VR解密VR解密
VR解密
 
「轉貼」移動互聯網行業盤點
「轉貼」移動互聯網行業盤點「轉貼」移動互聯網行業盤點
「轉貼」移動互聯網行業盤點
 
The overview of VR solutions
The overview of VR solutionsThe overview of VR solutions
The overview of VR solutions
 
Render thead of hwui
Render thead of hwuiRender thead of hwui
Render thead of hwui
 
Project Tango
Project TangoProject Tango
Project Tango
 
[轉貼] 社群大數據 - 輿情觀測及分析應用
[轉貼] 社群大數據 - 輿情觀測及分析應用[轉貼] 社群大數據 - 輿情觀測及分析應用
[轉貼] 社群大數據 - 輿情觀測及分析應用
 
財報分析1
財報分析1財報分析1
財報分析1
 
WebRTC overview
WebRTC overviewWebRTC overview
WebRTC overview
 
Device tree
Device treeDevice tree
Device tree
 
Android 待機與操作耗電檢查
Android 待機與操作耗電檢查Android 待機與操作耗電檢查
Android 待機與操作耗電檢查
 
Analyzing Display and Performance with Systrace
Analyzing Display and Performance with SystraceAnalyzing Display and Performance with Systrace
Analyzing Display and Performance with Systrace
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

Deep learning