SlideShare a Scribd company logo
1 of 37
Feedback
■Activation function
 Why use?
• Large hidden layer : complex function
• Small hidden layer : simple function
• Input node : 13, output node : 1
■ hidden layer 1 (Node 4 ) : 13 * 4 + 5 = 57
■ Hidden layer 2 (Node 2) : 13 * 2 + 2 * 2 + 3 = 35
Ch4_Feedback
Interaction Lab., Kumoh National Institue of Technology 2
■Sigmoid function
 ℎ 𝑥 =
1
1+𝑒−𝑥
 Smooth curve, continuous variation
 Return real-valued
 ℎ 1 = 0.731
■ReLU function
 ℎ(𝑥) =
𝑥 (𝑥 ≥ 0)
0 (𝑥 < 0)
 Leakly ReLU, PReLU
Ch4_Feedback
Interaction Lab., Kumoh National Institue of Technology 3
■Sigmoid function
 Gradient vanishing
• Backpropagation
Ch4_Feedback
Interaction Lab., Kumoh National Institue of Technology 4
■HOG(Histogram of Gradient)
 Use image’s local gradient as a feature of the image
Ch5_Feedback
Interaction Lab., Kumoh National Institue of Technology 5
■GD vs SGD
 Gradient Descent
• Compute all the data => 1 h
• Take the best step forward
• 6 step = 6 h
• Sure, but it is too slow
 Stochastic Gradient Descent
• Compute only some data => 5 m
• Take quickly step forward
• 10 step = 50 m
• It is a little lost, but it is going fast
Ch5_Feedback
Interaction Lab., Kumoh National Institue of Technology 6
■Optimizer
Ch5_Feedback
Interaction Lab., Kumoh National Institue of Technology 7
Interaction Lab. Kumoh National Institute of Technology
Deep Learning from Scratch
chapter 6. back propagation
JaeYeop Jeong
■Intro
■Computational graph
■Chain rule
■Back propagation
■Implementation of simple layer
■Implementation of activation function layer
■Implementation of Affine/softmax layer
Agenda
Interaction Lab., Kumoh National Institue of Technology 9
■Numerical differentials are simple and easy to implement
 Long time to calculate
■Back propagation
 To calculate the gradient of the weight efficiently
 A formula or Computational graph
Intro
Interaction Lab., Kumoh National Institue of Technology 10
■A graph of the calculation process
 Node, edge
■Q1
 현빈 군은 슈퍼에서 1개에 100원인 사과를 2개 샀습니다. 이때 지불
금액을 구하세요. 단 소비세가 10% 부과됩니다.
Computational graph(1/5)
Interaction Lab., Kumoh National Institue of Technology 11
Computational graph(2/5)
Interaction Lab., Kumoh National Institue of Technology 12
■Q2
 현빈 군은 슈퍼에서 사과를 2개, 귤을 3개 샀습니다. 사과는 1개에 100
원, 귤은 1개 150원입니다. 소비세가 10%일 때 지불 금액을 구하세요.
 Construct the Computational graph
 Proceed from left to right with the calculation
Computational graph(3/5)
Interaction Lab., Kumoh National Institue of Technology 13
■Local computation
 A small range directly related to oneself
Computational graph(4/5)
Interaction Lab., Kumoh National Institue of Technology 14
4000 + 200 = 4200
■Why computational graph
 Local computation
 Keep all intermediate calculation results
 Calculate differentials efficiently
• Apple prices : 𝑥, Payment(𝐿) :
𝜕𝐿
𝜕𝑥
Computational graph(5/5)
Interaction Lab., Kumoh National Institue of Technology 15
■Back propagation of computational graph
 Multiply the local differential in the forward and opposite directions
• 𝑦 = 𝑓 𝑥 = 𝑥2
,
𝜕𝑦
𝜕𝑥
= 2𝑥
Chain rule(1/3)
Interaction Lab., Kumoh National Institue of Technology 16
𝑓
𝑥 𝑦
𝐸
𝜕𝑦
𝜕𝑥
𝐸
■𝑧 = 𝑡2
, 𝑡 = 𝑥 + 𝑦
Chain rule(2/3)
Interaction Lab., Kumoh National Institue of Technology 17
Chain rule(3/3)
Interaction Lab., Kumoh National Institue of Technology 18
𝜕𝑧
𝜕𝑧
𝜕𝑧
𝜕𝑡
𝜕𝑡
𝜕𝑥
=
𝜕𝑧
𝜕𝑡
𝜕𝑡
𝜕𝑥
=
𝜕𝑧
𝜕𝑥
■Back propagation of add node
 𝑧 = 𝑥 + 𝑦,
𝜕𝑧
𝜕𝑥
= 1,
𝜕𝑧
𝜕𝑦
= 1
Back propagation(1/5)
Interaction Lab., Kumoh National Institue of Technology 19
■Back propagation of add node
 Add node : Send as it is
Back propagation(2/5)
Interaction Lab., Kumoh National Institue of Technology 20
■Back propagation of multiply node
 𝑧 = 𝑥𝑦,
𝜕𝑧
𝜕𝑥
= 𝑦,
𝜕𝑧
𝜕𝑦
= 𝑥
Back propagation(3/5)
Interaction Lab., Kumoh National Institue of Technology 21
■Back propagation of multiply node
 Multiply interchangeable values
• Input of forward propagation
Back propagation(4/5)
Interaction Lab., Kumoh National Institue of Technology 22
■Example
Back propagation(5/5)
Interaction Lab., Kumoh National Institue of Technology 23
■Multiply layer
Implementation of simple layer(1/3)
Interaction Lab., Kumoh National Institue of Technology 24
■Add layer
Implementation of simple layer(2/3)
Interaction Lab., Kumoh National Institue of Technology 25
Implementation of simple layer(3/3)
Interaction Lab., Kumoh National Institue of Technology 26
■ReLU layer
 𝑦 =
𝑥 ( 𝑥 > 0)
0 (𝑥 ≤ 0)
𝜕𝑦
𝜕𝑥
=
1 (𝑥 > 0)
0 (𝑥 ≤ 0)
Implementation of activation function layer
Interaction Lab., Kumoh National Institue of Technology 27
𝑟𝑒𝑙𝑢
𝑥 𝑦
𝜕𝐿
𝜕𝑦
𝜕𝐿
𝜕𝑦
𝑟𝑒𝑙𝑢
𝑥 𝑦
0 𝜕𝐿
𝜕𝑦
𝑥 > 0
𝑥 ≤ 0
■Sigmoid layer
 𝑦 =
1
1+exp(−𝑥)
 exp 𝑥 → 𝑦 = exp 𝑥
 / → 𝑦 =
1
𝑥
Implementation of activation function layer
Interaction Lab., Kumoh National Institue of Technology 28
■Sigmoid layer
 𝑦 =
1
1+exp(−𝑥)
, (1 + exp −𝑥 = 𝑥) 𝑦 =
1
𝑥
Implementation of activation function layer
Interaction Lab., Kumoh National Institue of Technology 29
■Sigmoid layer
Implementation of activation function layer
Interaction Lab., Kumoh National Institue of Technology 30
■Sigmoid layer
Implementation of activation function layer
Interaction Lab., Kumoh National Institue of Technology 31
■Affine layer
Implementation of Affine/softmax layer
Interaction Lab., Kumoh National Institue of Technology 32
■Batch affine layer
Implementation of Affine/softmax layer
Interaction Lab., Kumoh National Institue of Technology 33
■Softmax-with-Loss layer
 Softmax layer
 Cross entropy error
Implementation of Affine/softmax layer
Interaction Lab., Kumoh National Institue of Technology 34
■Softmax-with-Loss layer
Implementation of Affine/softmax layer
Interaction Lab., Kumoh National Institue of Technology 35
■Softmax-with-Loss layer
 t : (0, 1, 0)
 y : (0.3, 0.2, 0.5) => y – t : (0.3, -0.8, 0.5)
Implementation of Affine/softmax layer
Interaction Lab., Kumoh National Institue of Technology 36
Q&A
Interaction Lab., Kumoh National Institue of Technology 37

More Related Content

What's hot

Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesDr Piyush Charan
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operationsVATSAL TRIVEDI
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycleKumar
 
ALU arithmetic logic unit
ALU  arithmetic logic unitALU  arithmetic logic unit
ALU arithmetic logic unitKarthik Prof.
 
Artificial bee colony (abc)
Artificial bee colony (abc)Artificial bee colony (abc)
Artificial bee colony (abc)quadmemo
 
動的計画法の基礎と応用 ~色々使える大局的最適化法
動的計画法の基礎と応用 ~色々使える大局的最適化法動的計画法の基礎と応用 ~色々使える大局的最適化法
動的計画法の基礎と応用 ~色々使える大局的最適化法Seiichi Uchida
 
What is Robotics - Robotics Concept Explained for Kids
What is Robotics - Robotics Concept Explained for KidsWhat is Robotics - Robotics Concept Explained for Kids
What is Robotics - Robotics Concept Explained for KidsVivek chan
 
Robotics and its Advancement
Robotics and its AdvancementRobotics and its Advancement
Robotics and its Advancementsourbhk6
 
신재생에너지
신재생에너지신재생에너지
신재생에너지J Park
 
AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順Keiichi Takahashi
 
visheshwar oraon robotics presentation
visheshwar oraon   robotics presentationvisheshwar oraon   robotics presentation
visheshwar oraon robotics presentationAkash Maurya
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Student
 
Humanoid robotics
Humanoid roboticsHumanoid robotics
Humanoid roboticsLalit Garg
 
虫食算を作るアルゴリズム 公表Ver
虫食算を作るアルゴリズム 公表Ver虫食算を作るアルゴリズム 公表Ver
虫食算を作るアルゴリズム 公表VerKensuke Otsuki
 
Introduction to cython
Introduction to cythonIntroduction to cython
Introduction to cythonAtsuo Ishimoto
 

What's hot (20)

Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Zadachi blok-shema
Zadachi blok-shemaZadachi blok-shema
Zadachi blok-shema
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic Gates
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
ALU arithmetic logic unit
ALU  arithmetic logic unitALU  arithmetic logic unit
ALU arithmetic logic unit
 
Artificial bee colony (abc)
Artificial bee colony (abc)Artificial bee colony (abc)
Artificial bee colony (abc)
 
動的計画法の基礎と応用 ~色々使える大局的最適化法
動的計画法の基礎と応用 ~色々使える大局的最適化法動的計画法の基礎と応用 ~色々使える大局的最適化法
動的計画法の基礎と応用 ~色々使える大局的最適化法
 
humanoid robots
humanoid robotshumanoid robots
humanoid robots
 
What is Robotics - Robotics Concept Explained for Kids
What is Robotics - Robotics Concept Explained for KidsWhat is Robotics - Robotics Concept Explained for Kids
What is Robotics - Robotics Concept Explained for Kids
 
Bee algorithm
Bee algorithmBee algorithm
Bee algorithm
 
Robotics and its Advancement
Robotics and its AdvancementRobotics and its Advancement
Robotics and its Advancement
 
Helib
HelibHelib
Helib
 
신재생에너지
신재생에너지신재생에너지
신재생에너지
 
AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順
 
visheshwar oraon robotics presentation
visheshwar oraon   robotics presentationvisheshwar oraon   robotics presentation
visheshwar oraon robotics presentation
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
Humanoid robotics
Humanoid roboticsHumanoid robotics
Humanoid robotics
 
虫食算を作るアルゴリズム 公表Ver
虫食算を作るアルゴリズム 公表Ver虫食算を作るアルゴリズム 公表Ver
虫食算を作るアルゴリズム 公表Ver
 
Introduction to cython
Introduction to cythonIntroduction to cython
Introduction to cython
 

Similar to deep learning from scratch chapter 6.backpropagation

hands on machine learning Chapter 4 model training
hands on machine learning Chapter 4 model traininghands on machine learning Chapter 4 model training
hands on machine learning Chapter 4 model trainingJaey Jeong
 
Gaze estimation using transformer
Gaze estimation using transformerGaze estimation using transformer
Gaze estimation using transformerJaey Jeong
 
deep learning from scratch chapter 3 neural network
deep learning from scratch chapter 3 neural networkdeep learning from scratch chapter 3 neural network
deep learning from scratch chapter 3 neural networkJaey Jeong
 
Unsupervised representation learning for gaze estimation
Unsupervised representation learning for gaze estimationUnsupervised representation learning for gaze estimation
Unsupervised representation learning for gaze estimationJaey Jeong
 
Appearance based gaze estimation using deep features and random forest regres...
Appearance based gaze estimation using deep features and random forest regres...Appearance based gaze estimation using deep features and random forest regres...
Appearance based gaze estimation using deep features and random forest regres...Jaey Jeong
 
deep learning from scratch chapter 7.cnn
deep learning from scratch chapter 7.cnndeep learning from scratch chapter 7.cnn
deep learning from scratch chapter 7.cnnJaey Jeong
 
deep learning from scratch chapter 5.learning related skills
deep learning from scratch chapter 5.learning related skillsdeep learning from scratch chapter 5.learning related skills
deep learning from scratch chapter 5.learning related skillsJaey Jeong
 
deep learning from scratch chapter 4.neural network learing
deep learning from scratch chapter 4.neural network learingdeep learning from scratch chapter 4.neural network learing
deep learning from scratch chapter 4.neural network learingJaey Jeong
 
Mlp mixer an all-mlp architecture for vision
Mlp mixer  an all-mlp architecture for visionMlp mixer  an all-mlp architecture for vision
Mlp mixer an all-mlp architecture for visionJaey Jeong
 
Deep learning based gaze detection system for automobile drivers using nir ca...
Deep learning based gaze detection system for automobile drivers using nir ca...Deep learning based gaze detection system for automobile drivers using nir ca...
Deep learning based gaze detection system for automobile drivers using nir ca...Jaey Jeong
 
Improving accuracy of binary neural networks using unbalanced activation dist...
Improving accuracy of binary neural networks using unbalanced activation dist...Improving accuracy of binary neural networks using unbalanced activation dist...
Improving accuracy of binary neural networks using unbalanced activation dist...Jaey Jeong
 
Parallel Machine Learning- DSGD and SystemML
Parallel Machine Learning- DSGD and SystemMLParallel Machine Learning- DSGD and SystemML
Parallel Machine Learning- DSGD and SystemMLJanani C
 
Correctness attraction __kth_2017
Correctness attraction __kth_2017Correctness attraction __kth_2017
Correctness attraction __kth_2017Benjamin Danglot
 
Tablet gaze unconstrained appearance based gaze estimation in mobile tablets
Tablet gaze unconstrained appearance based gaze estimation in mobile tabletsTablet gaze unconstrained appearance based gaze estimation in mobile tablets
Tablet gaze unconstrained appearance based gaze estimation in mobile tabletsJaey Jeong
 
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
hands on machine learning Chapter 6&7 decision tree, ensemble and random foresthands on machine learning Chapter 6&7 decision tree, ensemble and random forest
hands on machine learning Chapter 6&7 decision tree, ensemble and random forestJaey Jeong
 
HOP-Rec_RecSys18
HOP-Rec_RecSys18HOP-Rec_RecSys18
HOP-Rec_RecSys18Matt Yang
 
Algorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsAlgorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsChandan
 
Parallel Optimization in Machine Learning
Parallel Optimization in Machine LearningParallel Optimization in Machine Learning
Parallel Optimization in Machine LearningFabian Pedregosa
 

Similar to deep learning from scratch chapter 6.backpropagation (20)

hands on machine learning Chapter 4 model training
hands on machine learning Chapter 4 model traininghands on machine learning Chapter 4 model training
hands on machine learning Chapter 4 model training
 
Gaze estimation using transformer
Gaze estimation using transformerGaze estimation using transformer
Gaze estimation using transformer
 
deep learning from scratch chapter 3 neural network
deep learning from scratch chapter 3 neural networkdeep learning from scratch chapter 3 neural network
deep learning from scratch chapter 3 neural network
 
Unsupervised representation learning for gaze estimation
Unsupervised representation learning for gaze estimationUnsupervised representation learning for gaze estimation
Unsupervised representation learning for gaze estimation
 
Appearance based gaze estimation using deep features and random forest regres...
Appearance based gaze estimation using deep features and random forest regres...Appearance based gaze estimation using deep features and random forest regres...
Appearance based gaze estimation using deep features and random forest regres...
 
deep learning from scratch chapter 7.cnn
deep learning from scratch chapter 7.cnndeep learning from scratch chapter 7.cnn
deep learning from scratch chapter 7.cnn
 
deep learning from scratch chapter 5.learning related skills
deep learning from scratch chapter 5.learning related skillsdeep learning from scratch chapter 5.learning related skills
deep learning from scratch chapter 5.learning related skills
 
deep learning from scratch chapter 4.neural network learing
deep learning from scratch chapter 4.neural network learingdeep learning from scratch chapter 4.neural network learing
deep learning from scratch chapter 4.neural network learing
 
Mlp mixer an all-mlp architecture for vision
Mlp mixer  an all-mlp architecture for visionMlp mixer  an all-mlp architecture for vision
Mlp mixer an all-mlp architecture for vision
 
Deep learning based gaze detection system for automobile drivers using nir ca...
Deep learning based gaze detection system for automobile drivers using nir ca...Deep learning based gaze detection system for automobile drivers using nir ca...
Deep learning based gaze detection system for automobile drivers using nir ca...
 
Improving accuracy of binary neural networks using unbalanced activation dist...
Improving accuracy of binary neural networks using unbalanced activation dist...Improving accuracy of binary neural networks using unbalanced activation dist...
Improving accuracy of binary neural networks using unbalanced activation dist...
 
Parallel Machine Learning- DSGD and SystemML
Parallel Machine Learning- DSGD and SystemMLParallel Machine Learning- DSGD and SystemML
Parallel Machine Learning- DSGD and SystemML
 
Correctness attraction __kth_2017
Correctness attraction __kth_2017Correctness attraction __kth_2017
Correctness attraction __kth_2017
 
Lesson 39
Lesson 39Lesson 39
Lesson 39
 
AI Lesson 39
AI Lesson 39AI Lesson 39
AI Lesson 39
 
Tablet gaze unconstrained appearance based gaze estimation in mobile tablets
Tablet gaze unconstrained appearance based gaze estimation in mobile tabletsTablet gaze unconstrained appearance based gaze estimation in mobile tablets
Tablet gaze unconstrained appearance based gaze estimation in mobile tablets
 
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
hands on machine learning Chapter 6&7 decision tree, ensemble and random foresthands on machine learning Chapter 6&7 decision tree, ensemble and random forest
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
 
HOP-Rec_RecSys18
HOP-Rec_RecSys18HOP-Rec_RecSys18
HOP-Rec_RecSys18
 
Algorithm of some numerical /computational methods
Algorithm of some numerical /computational methodsAlgorithm of some numerical /computational methods
Algorithm of some numerical /computational methods
 
Parallel Optimization in Machine Learning
Parallel Optimization in Machine LearningParallel Optimization in Machine Learning
Parallel Optimization in Machine Learning
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 

deep learning from scratch chapter 6.backpropagation

  • 2. ■Activation function  Why use? • Large hidden layer : complex function • Small hidden layer : simple function • Input node : 13, output node : 1 ■ hidden layer 1 (Node 4 ) : 13 * 4 + 5 = 57 ■ Hidden layer 2 (Node 2) : 13 * 2 + 2 * 2 + 3 = 35 Ch4_Feedback Interaction Lab., Kumoh National Institue of Technology 2
  • 3. ■Sigmoid function  ℎ 𝑥 = 1 1+𝑒−𝑥  Smooth curve, continuous variation  Return real-valued  ℎ 1 = 0.731 ■ReLU function  ℎ(𝑥) = 𝑥 (𝑥 ≥ 0) 0 (𝑥 < 0)  Leakly ReLU, PReLU Ch4_Feedback Interaction Lab., Kumoh National Institue of Technology 3
  • 4. ■Sigmoid function  Gradient vanishing • Backpropagation Ch4_Feedback Interaction Lab., Kumoh National Institue of Technology 4
  • 5. ■HOG(Histogram of Gradient)  Use image’s local gradient as a feature of the image Ch5_Feedback Interaction Lab., Kumoh National Institue of Technology 5
  • 6. ■GD vs SGD  Gradient Descent • Compute all the data => 1 h • Take the best step forward • 6 step = 6 h • Sure, but it is too slow  Stochastic Gradient Descent • Compute only some data => 5 m • Take quickly step forward • 10 step = 50 m • It is a little lost, but it is going fast Ch5_Feedback Interaction Lab., Kumoh National Institue of Technology 6
  • 7. ■Optimizer Ch5_Feedback Interaction Lab., Kumoh National Institue of Technology 7
  • 8. Interaction Lab. Kumoh National Institute of Technology Deep Learning from Scratch chapter 6. back propagation JaeYeop Jeong
  • 9. ■Intro ■Computational graph ■Chain rule ■Back propagation ■Implementation of simple layer ■Implementation of activation function layer ■Implementation of Affine/softmax layer Agenda Interaction Lab., Kumoh National Institue of Technology 9
  • 10. ■Numerical differentials are simple and easy to implement  Long time to calculate ■Back propagation  To calculate the gradient of the weight efficiently  A formula or Computational graph Intro Interaction Lab., Kumoh National Institue of Technology 10
  • 11. ■A graph of the calculation process  Node, edge ■Q1  현빈 군은 슈퍼에서 1개에 100원인 사과를 2개 샀습니다. 이때 지불 금액을 구하세요. 단 소비세가 10% 부과됩니다. Computational graph(1/5) Interaction Lab., Kumoh National Institue of Technology 11
  • 12. Computational graph(2/5) Interaction Lab., Kumoh National Institue of Technology 12
  • 13. ■Q2  현빈 군은 슈퍼에서 사과를 2개, 귤을 3개 샀습니다. 사과는 1개에 100 원, 귤은 1개 150원입니다. 소비세가 10%일 때 지불 금액을 구하세요.  Construct the Computational graph  Proceed from left to right with the calculation Computational graph(3/5) Interaction Lab., Kumoh National Institue of Technology 13
  • 14. ■Local computation  A small range directly related to oneself Computational graph(4/5) Interaction Lab., Kumoh National Institue of Technology 14 4000 + 200 = 4200
  • 15. ■Why computational graph  Local computation  Keep all intermediate calculation results  Calculate differentials efficiently • Apple prices : 𝑥, Payment(𝐿) : 𝜕𝐿 𝜕𝑥 Computational graph(5/5) Interaction Lab., Kumoh National Institue of Technology 15
  • 16. ■Back propagation of computational graph  Multiply the local differential in the forward and opposite directions • 𝑦 = 𝑓 𝑥 = 𝑥2 , 𝜕𝑦 𝜕𝑥 = 2𝑥 Chain rule(1/3) Interaction Lab., Kumoh National Institue of Technology 16 𝑓 𝑥 𝑦 𝐸 𝜕𝑦 𝜕𝑥 𝐸
  • 17. ■𝑧 = 𝑡2 , 𝑡 = 𝑥 + 𝑦 Chain rule(2/3) Interaction Lab., Kumoh National Institue of Technology 17
  • 18. Chain rule(3/3) Interaction Lab., Kumoh National Institue of Technology 18 𝜕𝑧 𝜕𝑧 𝜕𝑧 𝜕𝑡 𝜕𝑡 𝜕𝑥 = 𝜕𝑧 𝜕𝑡 𝜕𝑡 𝜕𝑥 = 𝜕𝑧 𝜕𝑥
  • 19. ■Back propagation of add node  𝑧 = 𝑥 + 𝑦, 𝜕𝑧 𝜕𝑥 = 1, 𝜕𝑧 𝜕𝑦 = 1 Back propagation(1/5) Interaction Lab., Kumoh National Institue of Technology 19
  • 20. ■Back propagation of add node  Add node : Send as it is Back propagation(2/5) Interaction Lab., Kumoh National Institue of Technology 20
  • 21. ■Back propagation of multiply node  𝑧 = 𝑥𝑦, 𝜕𝑧 𝜕𝑥 = 𝑦, 𝜕𝑧 𝜕𝑦 = 𝑥 Back propagation(3/5) Interaction Lab., Kumoh National Institue of Technology 21
  • 22. ■Back propagation of multiply node  Multiply interchangeable values • Input of forward propagation Back propagation(4/5) Interaction Lab., Kumoh National Institue of Technology 22
  • 23. ■Example Back propagation(5/5) Interaction Lab., Kumoh National Institue of Technology 23
  • 24. ■Multiply layer Implementation of simple layer(1/3) Interaction Lab., Kumoh National Institue of Technology 24
  • 25. ■Add layer Implementation of simple layer(2/3) Interaction Lab., Kumoh National Institue of Technology 25
  • 26. Implementation of simple layer(3/3) Interaction Lab., Kumoh National Institue of Technology 26
  • 27. ■ReLU layer  𝑦 = 𝑥 ( 𝑥 > 0) 0 (𝑥 ≤ 0) 𝜕𝑦 𝜕𝑥 = 1 (𝑥 > 0) 0 (𝑥 ≤ 0) Implementation of activation function layer Interaction Lab., Kumoh National Institue of Technology 27 𝑟𝑒𝑙𝑢 𝑥 𝑦 𝜕𝐿 𝜕𝑦 𝜕𝐿 𝜕𝑦 𝑟𝑒𝑙𝑢 𝑥 𝑦 0 𝜕𝐿 𝜕𝑦 𝑥 > 0 𝑥 ≤ 0
  • 28. ■Sigmoid layer  𝑦 = 1 1+exp(−𝑥)  exp 𝑥 → 𝑦 = exp 𝑥  / → 𝑦 = 1 𝑥 Implementation of activation function layer Interaction Lab., Kumoh National Institue of Technology 28
  • 29. ■Sigmoid layer  𝑦 = 1 1+exp(−𝑥) , (1 + exp −𝑥 = 𝑥) 𝑦 = 1 𝑥 Implementation of activation function layer Interaction Lab., Kumoh National Institue of Technology 29
  • 30. ■Sigmoid layer Implementation of activation function layer Interaction Lab., Kumoh National Institue of Technology 30
  • 31. ■Sigmoid layer Implementation of activation function layer Interaction Lab., Kumoh National Institue of Technology 31
  • 32. ■Affine layer Implementation of Affine/softmax layer Interaction Lab., Kumoh National Institue of Technology 32
  • 33. ■Batch affine layer Implementation of Affine/softmax layer Interaction Lab., Kumoh National Institue of Technology 33
  • 34. ■Softmax-with-Loss layer  Softmax layer  Cross entropy error Implementation of Affine/softmax layer Interaction Lab., Kumoh National Institue of Technology 34
  • 35. ■Softmax-with-Loss layer Implementation of Affine/softmax layer Interaction Lab., Kumoh National Institue of Technology 35
  • 36. ■Softmax-with-Loss layer  t : (0, 1, 0)  y : (0.3, 0.2, 0.5) => y – t : (0.3, -0.8, 0.5) Implementation of Affine/softmax layer Interaction Lab., Kumoh National Institue of Technology 36
  • 37. Q&A Interaction Lab., Kumoh National Institue of Technology 37