Votre premier réseau de neurones

Introduction au Deep Learning avec Keras

Miguel Esteban

Data Scientist & Founder

Un réseau de neurones ?

Introduction au Deep Learning avec Keras

Paramètres

Introduction au Deep Learning avec Keras

Descente de gradient

Introduction au Deep Learning avec Keras

L'API séquentielle

Introduction au Deep Learning avec Keras

L'API séquentielle

Introduction au Deep Learning avec Keras

L'API séquentielle

Introduction au Deep Learning avec Keras

Définir un réseau de neurones

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Create a new sequential model model = Sequential()
# Add and input and dense layer model.add(Dense(2, input_shape=(3,)))
# Add a final 1 neuron layer model.add(Dense(1))

Introduction au Deep Learning avec Keras

Ajouter des fonctions d'activation

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Create a new sequential model model = Sequential()
# Add and input and dense layer model.add(Dense(2, input_shape=(3,)))
# Add a final 1 neuron layer model.add(Dense(1))

Introduction au Deep Learning avec Keras

Ajouter des fonctions d'activation

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Create a new sequential model model = Sequential()
# Add and input and dense layer model.add(Dense(2, input_shape=(3,), activation="relu"))
# Add a final 1 neuron layer model.add(Dense(1))

Introduction au Deep Learning avec Keras

Résumer votre modèle !

model.summary()
Layer (type)                 Output Shape              Param #   
=================================================================
dense_3 (Dense)              (None, 2)                 8         
_________________________________________________________________
dense_4 (Dense)              (None, 1)                 3         
=================================================================
Total params: 11
Trainable params: 11
Non-trainable params: 0
_________________________________________________________________
Introduction au Deep Learning avec Keras

Visualiser les paramètres

Introduction au Deep Learning avec Keras

Visualiser les paramètres

Introduction au Deep Learning avec Keras

Résumer votre modèle !

model.summary()
Layer (type)                 Output Shape              Param #   
=================================================================
dense_3 (Dense)              (None, 2)             --> 8 <--       
_________________________________________________________________
dense_4 (Dense)              (None, 1)                 3         
=================================================================
Total params: 11
Trainable params: 11
Non-trainable params: 0
_________________________________________________________________
Introduction au Deep Learning avec Keras

Passons au code !

Introduction au Deep Learning avec Keras

Preparing Video For Download...