Deep Learning
with TensorFlow 2 and PyTorch
jonkrohn.com/talks
github.com/jonkrohn/DLTFpT
Feb-Apr 2022
Jon Krohn, Ph.D.
Click to edit Master title style
Deep Learning
with TensorFlow 2 and PyTorch
Slides: jonkrohn.com/talks
Code: github.com/jonkrohn/DLTFpT
Stay in Touch:
jonkrohn.com to sign up for email newsletter
linkedin.com/in/jonkrohn
jonkrohn.com/youtube
twitter.com/JonKrohnLearns
ODSC AI+ ML Foundations Series
Subjects…
…are foundational for deeply understanding ML models.
github.com/jonkrohn/ML-foundations
The Pomodoro Technique
Rounds of:
Questions best handled at breaks, so save questions until then.
When people ask questions that have already been answered, do me a favor and let them know, politely providing response if appropriate.
Except during breaks, I recommend attending to this lecture only as topics are not discrete: Later material builds on earlier material.
POLL
Where are you?
POLL
What are you?
POLL
What’s your level of experience with the topic?
Deep Learning Fundamentals
Click to edit Master title style
Segment 1:
The Unreasonable Effectiveness of Deep Learning
Deep Learning Fundamentals
Click to edit Master title style
Segment 1:
The Unreasonable Effectiveness of Deep Learning
Deep Learning Fundamentals
Click to edit Master title style
35% off orders:
bit.ly/iTkrohn
(use code KROHN during checkout)
Book-signing at upcoming non-virtual ODSC events!
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Neocognitron (Fukushima, 1980)
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Yann LeCun and Yoshua Bengio
Click to edit Master title style
LeNet-5 (LeCun et al., 1998)
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Click to edit Master title style
Traditional ML vs Deep Learning
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Viola & Jones (2001)
Click to edit Master title style
Case Study: The History of Vision
Click to edit Master title style
Geoff Hinton
Click to edit Master title style
AlexNet (Krizhevsky et al., 2012)
Click to edit Master title style
Click to edit Master title style
Fei-Fei Li
Click to edit Master title style
POLL
If a voice recognition algorithm is fed audio of speech as inputs, given corresponding text as the outputs (labels) to learn, and no features are explicitly programmed, is this a:
Click to edit Master title style
Segment 1:
The Unreasonable Effectiveness of Deep Learning
Deep Learning Fundamentals
Click to edit Master title style
Dense Networks
Click to edit Master title style
The Cart Before the Horse (Chapter 5)
GitHub repo: github.com/jonkrohn/DLTFpT
Interactive Colab demo: Shallow Net in TensorFlow
Click to edit Master title style
ConvNets: Convolutional Networks
Click to edit Master title style
ConvNets: Convolutional Networks
Ren et al. (2015)
Click to edit Master title style
RNNs: Recurrent Neural Networks
Click to edit Master title style
GANs: Generative Adversarial Networks
Click to edit Master title style
GANs: Generative Adversarial Networks
Karros et al. (2018)
Click to edit Master title style
Deep Reinforcement Learning
Click to edit Master title style
Demis Hassabis and David Silver
Click to edit Master title style
POLL
If you were designing an algorithm to learn to play Tetris by maximizing its score, which of these Deep Learning approaches would be most appropriate?
Click to edit Master title style
POLL
If you were designing an algorithm to recognise tumours in medical images, which of these Deep Learning approaches would be most appropriate?
Click to edit Master title style
POLL
If you were designing an algorithm to predict stock price movements based on time series data, which of these Deep Learning approaches would be most appropriate?
Click to edit Master title style
Segment 1:
The Unreasonable Effectiveness of Deep Learning
Deep Learning Fundamentals
Click to edit Master title style
Leading Deep Learning Libraries
Click to edit Master title style
Click to edit Master title style
Click to edit Master title style
| Caffe | Torch | MXNet | TensorFlow |
Language | Python, Matlab | Lua, C | Python, R, C++ Julia, Matlab JavaScript, Go Scala, Perl | Python, C, C++ Java, Go, JS, Swift (Haskell, Julia, R, Scala, Rust, C#) |
Programming Style | Symbolic | Imperative | Imperative | Imperative (since 2.0) |
Parallel GPUs: Data | Yes | Yes | Yes | Yes |
Parallel GPUs: Model | | Yes | Yes | Yes |
Pre-Trained Models | Model Zoo | Model Zoo | Model Zoo | github.com/tensorflow/models |
High-Level APIs | | PyTorch | in-built | Keras |
Particular Strength | CNNs | interactivity | | production deployment |
Leading Deep Learning Libraries
Click to edit Master title style
PyTorch | TensorFlow |
“NumPy”, optimized for GPUs | ported to Python from C++ |
dynamic auto-differentiation (autodiff) | static graph (historically or with Keras) |
debugging is easier | |
fast.ai API | Keras API |
| more widely adopted |
TorchScript Just-In-Time compilation | TensorFlow Serving, .js, Lite, tf.data, tf.io |
more enjoyable for model design | better for production deployments |
Learn both! And you can translate: github.com/onnx/onnx
Click to edit Master title style
Segment 2:
Essential Deep Learning Theory
Deep Learning Fundamentals
Click to edit Master title style
“Whiteboarding”!
Click to edit Master title style
Your Arsenal
Activation Functions
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Gradient Descent
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Gradient Descent
Backpropagation
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Stochastic Gradient Descent
Backpropagation
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Stochastic Gradient Descent
Backpropagation
Initialization
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Stochastic Gradient Descent
Backpropagation
Initialization
Layers
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Stochastic Gradient Descent
Backpropagation
Initialization
Layers
Avoiding Overfitting
Click to edit Master title style
Dropout
Click to edit Master title style
Your Arsenal
Activation Functions
Cost Functions
Stochastic Gradient Descent
Backpropagation
Initialization
Layers
Avoiding Overfitting
Click to edit Master title style
TensorFlow Playground
interactive demo: bit.ly/TFplayground
Click to edit Master title style
Part 3:
Deep Learning with TensorFlow
Deep Learning Fundamentals
Click to edit Master title style
Revisiting our Shallow Net
interactive Colab demo: Shallow Net in TensorFlow
Click to edit Master title style
Deep Nets in TensorFlow
interactive Colab demo: Deep Net in TF (bit.ly/deepNetTF)
Click to edit Master title style
Deep Nets in PyTorch
interactive Colab demos:
Click to edit Master title style
Pointers for DL Job Search
Click to edit Master title style
ODSC AI+ ML Foundations Series
Optimization builds upon and is foundational for:
Deeply understanding machine learning models.
github.com/jonkrohn/ML-foundations
POLL
What deep learning topics interest you most?
Click to edit Master title style
35% off orders:
bit.ly/iTkrohn
(use code KROHN during checkout)
Book-signing at upcoming non-virtual ODSC events!
Click to edit Master title style
Stay in Touch
jonkrohn.com to sign up for email newsletter
linkedin.com/in/jonkrohn
youtube.com/c/JonKrohnLearns
twitter.com/JonKrohnLearns