Rétropropagation en pratique

Introduction à Deep Learning en Python

Dan Becker

Data Scientist and contributor to Keras and TensorFlow libraries

Rétropropagation

ch2_4_v2.002.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.003.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.004.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.010.png

Introduction à Deep Learning en Python

Calcul des pentes associées à un poids

  • Le gradient d'un poids est le produit de :
    1. La valeur du nœud en amont de ce poids
    2. La pente de la fonction d'activation du nœud alimenté
    3. La pente de la fonction de perte par rapport au nœud de sortie
Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.016.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.017.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.018.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.019.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.020.png

Introduction à Deep Learning en Python

Rétropropagation

ch2_4_v2.021.png

Introduction à Deep Learning en Python

Rétropropagation : récapitulatif

  • Partir d'un ensemble aléatoire de poids
  • Utiliser la propagation avant pour prédire
  • Utiliser la rétropropagation pour calculer la pente de la perte par rapport à chaque poids
  • Multiplier cette pente par le taux d'apprentissage, puis la soustraire des poids actuels
  • Répéter le cycle jusqu'à atteindre une zone plate
Introduction à Deep Learning en Python

Descente de gradient stochastique

  • On calcule souvent les pentes sur un sous-ensemble des données (un « batch »)
  • Utiliser un autre lot de données pour la mise à jour suivante
  • Reprendre au début une fois toutes les données utilisées
  • Chaque passage sur les données d'entraînement s'appelle une époque
  • Quand les pentes sont calculées un lot à la fois : descente de gradient stochastique
Introduction à Deep Learning en Python

Passons à la pratique !

Introduction à Deep Learning en Python

Preparing Video For Download...