SlideShare a Scribd company logo
1 of 37
Backpropagation
Oswaldo Andrés Ordóñez Bolaños
Tabla de contenido
The chain rule
Introducción
redes
neuronales
Gradiente
descendiente
01
Backpropagati
on
02
03
04
01
Redes
neuronales
Neurona
𝑥1
𝑥2
𝑥3
𝑦1
Suma ponderada
Problema de regression lineal
𝑤1 𝑥1 + 𝑤2 𝑥2 + 𝑤3 𝑥3 + 𝑏
1
𝑤1
𝑤2
𝑤3
𝑏
Función de activación para
redes neuronales
Neurona
𝑥1
𝑥2
𝑥3
𝑦1
1
𝑤1
𝑤2
𝑤3
𝑏
f (𝒘𝟏𝒙𝟏 + 𝒘𝟐𝒙𝟐 + 𝒘𝟑𝒙𝟑 + 𝒃)
Los NN deben evaluarse con una función de
pérdida y optimizarse en consecuencia.
Los NN deben evaluarse con una función de
pérdida y optimizarse en consecuencia.
02
Gradiente
Descendiente
Recap
Configuración de pesos y
sesgo
Función de
activación
Función de coste
Error
Minimización con
gradiente
descendiente
f (𝒙) 𝐜𝐨𝐧𝐯𝐞𝐱𝐚 f (𝒙) 𝐧𝐨 𝐜𝐨𝐧𝐯𝐞𝐱𝐚
f ‘(𝒙) = 𝟎
Maximos locales Puntos de inflexión
Gradiente descendiente
Localizamos la mayor pendiente en la posición actual
Se avanza en la dirección con mayor pendiente
Paramos en una nueva posición y volvemos a repetir
Hasta la convergencia
𝜕𝑒𝑟𝑟𝑜𝑟
𝜕𝜃1
𝜕𝑒𝑟𝑟𝑜𝑟
𝜕𝜃2
𝜵𝒇
Gradiente
Pendiente de la función
𝜃 = 𝜃 − 𝜶 ∇𝑓
𝜶 = 𝑹𝒂𝒕𝒊𝒐 𝒅𝒆 𝒂𝒑𝒓𝒆𝒏𝒅𝒊𝒛𝒂𝒋𝒆
𝑪𝒖𝒂𝒏𝒕𝒐 𝒂𝒇𝒆𝒄𝒕𝒂 𝒂𝒍 𝒈𝒓𝒂𝒅𝒊𝒆𝒏𝒕𝒆
𝑒𝑟𝑟𝑜𝑟
𝜃1
𝜃2
03
The chain
rule
𝑑𝑦
𝑑𝑥
=
𝑑𝑦
𝑑𝑢
*
𝑑𝑢
𝑑𝑥
Peso
Altura
Altura
Tamaño de zapatos
Con nuestra altura
predicha, podemos
predecir la talla de
zapatos
Peso
Altura
Altura
Talla de zapatos
2
1
𝑃𝑒𝑛𝑑𝑖𝑒𝑛𝑡𝑒 =
2
1
𝑑 𝑎𝑙𝑡𝑢𝑟𝑎
𝑑 𝑝𝑒𝑠𝑜
= 2
𝐴𝑙𝑡𝑢𝑟𝑎 =
𝑑 𝐴𝑙𝑡𝑢𝑟𝑎
𝑑 𝑃𝑒𝑠𝑜
∗ 𝑃𝑒𝑠𝑜 = 2 ∗ 𝑃𝑒𝑠𝑜 (1)
1
1
4
𝑃𝑒𝑛𝑑𝑖𝑒𝑛𝑡𝑒 =
1
4
1
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝐴𝑙𝑡𝑢𝑟𝑎
=
1
4
𝑇𝑎𝑙𝑙𝑎 𝑧𝑎𝑝𝑎𝑡𝑜 =
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝐴𝑙𝑡𝑢𝑟𝑎
∗
𝑑 𝑎𝑙𝑡𝑢𝑟𝑎
𝑑 𝑝𝑒𝑠𝑜
∗ 𝑝𝑒𝑠𝑜(2)
𝑇𝑎𝑙𝑙𝑎 𝑧𝑎𝑝𝑎𝑡𝑜 =
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝐴𝑙𝑡𝑢𝑟𝑎
∗ 𝑇𝑎𝑙𝑙𝑎 =
1
4
∗ 𝐴𝑙𝑡𝑢𝑟𝑎 (2)
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝑃𝑒𝑠𝑜
=
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝐴𝑙𝑡𝑢𝑟𝑎
∗
𝑑 𝑎𝑙𝑡𝑢𝑟𝑎
𝑑 𝑝𝑒𝑠𝑜
𝑑 𝑇𝑎𝑙𝑙𝑎
𝑑 𝑃𝑒𝑠𝑜
=
1
4
∗ 2 =
1
2
Por cada 1 incremento en Peso, la talla
incrementa en
1
2
04
Backpropagatio
n
Aprendizaje y ajuste
de parámetros
1950, Rosenblatt
Perceptrons
Una red neuronal auto ajustará sus
parámetros para aprender una
representación interna de la información
que estaba procesando.
Recap 2.0
Configuración de pesos y
sesgo
Función de
activación
Función de coste
Error
Minimización con
gradiente
descendiente
¿ Como varia el coste ante
un cambio del parámetro
W ?
𝜕𝐶
𝜕𝑤
Retro propagación de errores
Método para calcular las derivadas parciales
de cada uno de los parámetros de nuestra red
con respecto a la función de coste, para
después optimizar con el descenso del
gradiente.
Contratistas
Sub
Secretario
s
Secretari
os
Alcalde
$ error
El error se retro propaga por
toda la red
Cada trabajador hará un reporte de cual es la
responsabilidad de dicho resultado
Algoritmo de backpropagation
Se envía a un ente de rendición de cuentas
El ente de rendición de cuentas decide quien
tuvo o no la culpa, lo saca o lo ajusta
Descenso del gradiente
Gradiente con
the chain rule
Parámetros inicializados de
forma aleatoria.
Implicando que seguramente
el error es muy grande
𝜕𝐶
𝜕𝑤𝑙
𝜕𝐶
𝜕𝑏𝑙
Ultima capa l
𝑍𝑙
= 𝑊𝑙
𝑋 + 𝑏𝑙
𝑎(𝑍𝑙
)
𝐶(𝑎(𝑍𝑙)) = 𝑒𝑟𝑟𝑜𝑟
Suma ponderada
Función de activación
Función de coste
𝜕𝐶
𝜕𝑤𝑙 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑤𝑙
𝜕𝐶
𝜕𝑎𝑙
Derivada con respecto a la función de coste
𝜕𝑎𝑙
𝜕𝑧𝑙
Derivada con respecto a la función de activació
𝜕𝑧𝑙
𝜕𝑤𝑙 -
𝜕𝑧𝑙
𝜕𝑏𝑙
𝜕𝑧𝑙
𝜕𝑤𝑙 = 𝑎𝐿−1
(1)
𝜕𝑧𝑙
𝜕𝑏𝑙
= 1 (2)
El valor de entrada de la
neurona que corresponde a
la salida de la capa anterior.
𝜕𝐶
𝜕𝑤𝑙 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑤𝑙
𝜕𝐶
𝜕𝑧𝑙
Error imputado a la neurona
𝛿𝑙
𝜕𝐶
𝜕𝑤𝑙 = 𝛿𝑙
*
𝜕𝑧𝑙
𝜕𝑤𝑙 = 𝛿𝑙
∗ 𝑎𝐿−1
𝜕𝐶
𝜕𝑏𝑙 = 𝛿𝑙*
𝜕𝑧𝑙
𝜕𝑏𝑙 = 𝛿𝑙
Reemplazamos (1) – (2)
¿ Y si son más capaz ?
𝜕𝐶
𝜕𝑤𝑙−1 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑎𝑙−1 ∗
𝜕𝑎𝑙−1
𝜕𝑧𝑙−1 ∗
𝜕𝑧𝑙−1
𝜕𝑤𝑙−1
𝜕𝐶
𝜕𝑏𝑙−1 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑎𝑙−1 ∗
𝜕𝑎𝑙−1
𝜕𝑧𝑙−1 ∗
𝜕𝑧𝑙−1
𝜕𝑏𝑙−1
𝛿𝑙
𝛿𝑙 1
𝑎𝐿−2
𝛿𝑙
𝛿𝑙
𝛿𝑙
𝐷𝑒𝑟𝑖𝑣𝑎𝑑𝑎 𝑓𝑢𝑛𝑐𝑖ó𝑛
𝑑𝑒 𝑎𝑐𝑡𝑖𝑣𝑎𝑐𝑖ó𝑛
𝛿𝑙
𝛿𝑙
𝜕𝑧𝑙
𝜕𝑎𝑙−1
Como varia la suma ponderada de una capa, cuando se varia el ouput de una capa previa
𝑤𝑙
𝜕𝐶
𝜕𝑤𝑙−1 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑎𝑙−1 ∗
𝜕𝑎𝑙−1
𝜕𝑧𝑙−1 ∗
𝜕𝑧𝑙−1
𝜕𝑤𝑙−1
𝜕𝐶
𝜕𝑏𝑙−1 =
𝜕𝐶
𝜕𝑎𝑙 ∗
𝜕𝑎𝑙
𝜕𝑧𝑙*
𝜕𝑧𝑙
𝜕𝑎𝑙−1 ∗
𝜕𝑎𝑙−1
𝜕𝑧𝑙−1 ∗
𝜕𝑧𝑙−1
𝜕𝑏𝑙−1
𝛿𝑙
𝛿𝑙 1
𝜕𝐶
𝜕𝑧𝑙−1= 𝛿𝑙−1
𝛿𝑙 =
𝜕𝐶
𝜕𝑎𝑙
∗
𝜕𝑎𝑙
𝜕𝑧𝑙
Computo del error de la ultima capa
Retropropagamos el error de la capa anterior
𝛿𝑙−1 = 𝛿𝑙 ∗ 𝑤𝑙 ∗
𝜕𝑎𝑙−1
𝜕𝑧𝑙−1
Calculamos las derivadas de la capa usando el error
𝜕𝐶
𝜕𝑤𝑙−1
= 𝛿𝑙−1
𝜕𝐶
𝜕𝑤𝑙−1= 𝛿𝑙−1
∗ 𝑎𝐿−2
Muchas
gracias
¿ Preguntas ?
Oswaldo Andrés Ordóñez
Bolaños

More Related Content

What's hot

What's hot (9)

Vibration Isolation of a LEGO® plate
Vibration Isolation of a LEGO® plateVibration Isolation of a LEGO® plate
Vibration Isolation of a LEGO® plate
 
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
 
IMPULSE RESPONSE OF SECOND ORDER SYSTEM
IMPULSE RESPONSE OF SECOND ORDER SYSTEMIMPULSE RESPONSE OF SECOND ORDER SYSTEM
IMPULSE RESPONSE OF SECOND ORDER SYSTEM
 
MINIMUM PHASE SYSTEMS
MINIMUM PHASE SYSTEMSMINIMUM PHASE SYSTEMS
MINIMUM PHASE SYSTEMS
 
Data fusion with kalman filtering
Data fusion with kalman filteringData fusion with kalman filtering
Data fusion with kalman filtering
 
Vibration isolation progect lego(r)
Vibration isolation progect lego(r)Vibration isolation progect lego(r)
Vibration isolation progect lego(r)
 
P210 13b
P210 13bP210 13b
P210 13b
 
ELECTROMAGNETICS: Laplace’s and poisson’s equation
ELECTROMAGNETICS: Laplace’s and poisson’s equationELECTROMAGNETICS: Laplace’s and poisson’s equation
ELECTROMAGNETICS: Laplace’s and poisson’s equation
 
Transfer fn mech. systm 1
Transfer fn mech. systm 1Transfer fn mech. systm 1
Transfer fn mech. systm 1
 

Similar to Backpropagation

14th_Class_19-03-2024 Control systems.pptx
14th_Class_19-03-2024 Control systems.pptx14th_Class_19-03-2024 Control systems.pptx
14th_Class_19-03-2024 Control systems.pptx
buttshaheemsoci77
 
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjdArjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
12345arjitcs
 

Similar to Backpropagation (20)

04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
 
Lecture 5 backpropagation
Lecture 5 backpropagationLecture 5 backpropagation
Lecture 5 backpropagation
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functions
 
Neural Networks
Neural NetworksNeural Networks
Neural Networks
 
Lesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdfLesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdf
 
Deep Feed Forward Neural Networks and Regularization
Deep Feed Forward Neural Networks and RegularizationDeep Feed Forward Neural Networks and Regularization
Deep Feed Forward Neural Networks and Regularization
 
Stochastic optimal control & rl
Stochastic optimal control & rlStochastic optimal control & rl
Stochastic optimal control & rl
 
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
 
Training DNN Models - II.pptx
Training DNN Models - II.pptxTraining DNN Models - II.pptx
Training DNN Models - II.pptx
 
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...  Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
Discrete Nonlinear Optimal Control of S/C Formations Near The L1 and L2 poi...
 
Backpropagation - Elisa Sayrol - UPC Barcelona 2018
Backpropagation - Elisa Sayrol - UPC Barcelona 2018Backpropagation - Elisa Sayrol - UPC Barcelona 2018
Backpropagation - Elisa Sayrol - UPC Barcelona 2018
 
Passivity-based control of rigid-body manipulator
Passivity-based control of rigid-body manipulatorPassivity-based control of rigid-body manipulator
Passivity-based control of rigid-body manipulator
 
Kalman filter for Beginners
Kalman filter for BeginnersKalman filter for Beginners
Kalman filter for Beginners
 
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
Backpropagation (DLAI D3L1 2017 UPC Deep Learning for Artificial Intelligence)
 
14th_Class_19-03-2024 Control systems.pptx
14th_Class_19-03-2024 Control systems.pptx14th_Class_19-03-2024 Control systems.pptx
14th_Class_19-03-2024 Control systems.pptx
 
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjdArjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
Arjrandomjjejejj3ejjeejjdjddjjdjdjdjdjdjdjdjdjd
 
Linear regression, costs & gradient descent
Linear regression, costs & gradient descentLinear regression, costs & gradient descent
Linear regression, costs & gradient descent
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...
 
MATEX @ DAC14
MATEX @ DAC14MATEX @ DAC14
MATEX @ DAC14
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Backpropagation