Je eerste neuraal netwerk

Introductie tot Deep Learning met Keras

Miguel Esteban

Data Scientist & Founder

Een neuraal netwerk?

Introductie tot Deep Learning met Keras

Parameters

Introductie tot Deep Learning met Keras

Gradient descent

Introductie tot Deep Learning met Keras

De Sequential API

Introductie tot Deep Learning met Keras

De Sequential API

Introductie tot Deep Learning met Keras

De Sequential API

Introductie tot Deep Learning met Keras

Een neuraal netwerk definiƫren

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Maak een nieuw sequential-model model = Sequential()
# Voeg een input- en dense-laag toe model.add(Dense(2, input_shape=(3,)))
# Voeg een laatste laag met 1 neuron toe model.add(Dense(1))

Introductie tot Deep Learning met Keras

Activaties toevoegen

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Maak een nieuw sequential-model model = Sequential()
# Voeg een input- en dense-laag toe model.add(Dense(2, input_shape=(3,)))
# Voeg een laatste laag met 1 neuron toe model.add(Dense(1))

Introductie tot Deep Learning met Keras

Activaties toevoegen

from tensorflow.keras.models import Sequential

from tensorflow.keras.layers import Dense
# Maak een nieuw sequential-model model = Sequential()
# Voeg een input- en dense-laag toe model.add(Dense(2, input_shape=(3,), activation="relu"))
# Voeg een laatste laag met 1 neuron toe model.add(Dense(1))

Introductie tot Deep Learning met Keras

Vat je model samen!

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
_________________________________________________________________
Introductie tot Deep Learning met Keras

Parameters visualiseren

Introductie tot Deep Learning met Keras

Parameters visualiseren

Introductie tot Deep Learning met Keras

Vat je model samen!

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
_________________________________________________________________
Introductie tot Deep Learning met Keras

Aan de slag met code!

Introductie tot Deep Learning met Keras

Preparing Video For Download...