Ваша перша нейронна мережа

Вступ до Deep Learning з Keras

Miguel Esteban

Data Scientist & Founder

Нейронна мережа?

Вступ до Deep Learning з Keras

Параметри

Вступ до Deep Learning з Keras

Спуск за градієнтом

Вступ до Deep Learning з Keras

Послідовний API

Вступ до Deep Learning з Keras

Послідовний API

Вступ до Deep Learning з Keras

Послідовний API

Вступ до Deep Learning з Keras

Визначення нейронної мережі

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))

Вступ до Deep Learning з Keras

Додавання активацій

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))

Вступ до Deep Learning з Keras

Додавання активацій

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))

Вступ до Deep Learning з Keras

Підсумуйте свою модель!

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
_________________________________________________________________
Вступ до Deep Learning з Keras

Візуалізуйте параметри

Вступ до Deep Learning з Keras

Візуалізуйте параметри

Вступ до Deep Learning з Keras

Підсумуйте свою модель!

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
_________________________________________________________________
Вступ до Deep Learning з Keras

Кодуймо!

Вступ до Deep Learning з Keras

Preparing Video For Download...