Professional Documents
Culture Documents
ch1 Slides PDF
ch1 Slides PDF
Introduction to
deep learning
Deep Learning in Python
Retirement Status
…
Deep Learning in Python
Predicted Predicted
Transactions Not Retired Transactions Not Retired
Retired Retired
Interactions
● Neural networks account for interactions really well
● Deep learning uses especially powerful neural networks
● Text
● Images
● Videos
● Audio
● Source code
Deep Learning in Python
Course structure
● First two chapters focus on conceptual knowledge
● Debug and tune deep learning models on conventional
prediction problems
● Lay the foundation for progressing towards modern
applications
● This will pay off in the third and fourth chapters
Deep Learning in Python
In [9]: model.add(Dense(1))
Deep Learning in Python
Number of
Bank Balance Transactions
Retirement Status
…
Deep Learning in Python
Let’s practice!
DEEP LEARNING IN PYTHON
Forward
propagation
Course Title
Forward propagation
Input Hidden Layer
1
# Children 2 5
1 2
Output
9 # Transactions
-1
-1
3 1 1
# Accounts
Deep Learning in Python
Forward propagation
Input Hidden Layer
1
# Children 2 5
2
1 Output
9 # Transactions
-1
-1
3 1 1
# Accounts
Deep Learning in Python
Forward propagation
Input Hidden Layer
1
# Children 2 5
2
1 Output
9 # Transactions
-1
-1
3 1 1
# Accounts
Deep Learning in Python
Forward propagation
Input Hidden Layer
1
# Children 2 5
2
1 Output
9 # Transactions
-1
-1
3 1 1
# Accounts
Course Title
Forward propagation
● Multiply - add process
● Dot product
● Forward propagation for one data point at a time
● Output is the prediction for that data point
Deep Learning in Python
3 -1
1 -1
1
Deep Learning in Python
In [7]: print(hidden_layer_values)
[5, 1]
In [9]: print(output)
9
Let’s practice!
DEEP LEARNING IN PYTHON
Activation
functions
Deep Learning in Python
Activation functions
● Applied to node inputs to produce node output
Deep Learning in Python
3 1 1
Deep Learning in Python
Activation functions
Input Hidden Layer
1 tanh(2+3)
2
2
1 Output
9
-1
-1
3 1
tanh(-2+3)
Deep Learning in Python
Activation functions
In [1]: import numpy as np
In [10]: print(output)
1.2382242525694254
DEEP LEARNING IN PYTHON
Let’s practice!
DEEP LEARNING IN PYTHON
Deeper networks
Deep Learning in Python
4
2 7
-5 2
55
4
2 7
-5 2
55
4
2 7
-5 2
55
4
2 7
-5 2
55
4
2 7
-5 2
55
55
55
55
55
-5
55
-5
55
-5
55
4
2 7
-5 2
55 0
364
4
2 7
-5 2
55 0 52
Representation learning
● Deep networks internally build representations of pa"erns in
the data
● Partially replace the need for feature engineering
● Subsequent layers build increasingly sophisticated
representations of raw data
Deep Learning in Python
Representation learning
Deep Learning in Python
Deep learning
● Modeler doesn’t need to specify the interactions
● When you train the model, the neural network gets weights
that find the relevant pa"erns to make be"er predictions
DEEP LEARNING IN PYTHON
Let’s practice!