introduction to deep learning...−training images for each category ranges from 732 to 1300...

81
Introduction to Deep Learning Prof. Kuan-Ting Lai 2019/7/2

Upload: others

Post on 27-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Introduction to Deep Learning

Prof. Kuan-Ting Lai

2019/7/2

Page 2: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Deep Learning – a new Buzzword

2

Page 3: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AI Papers

3

Page 4: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

4

Registration of NIPS

Page 5: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AL/ML Investement

5

Page 6: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Source: Sand Hill Econometrics

6Source: Sand Hill Econometrics

Page 7: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

7

Page 8: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AlphaGo

8

Page 9: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

So, what is Deep Learning?

Page 10: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

10

Page 11: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Machine Learning

Page 12: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

12

Page 13: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

13

Page 14: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Learning Representation

• Objective: Classify white & black

• Input: (x, y)

• Output: Black or White

14

Page 15: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

The Master Algorithm – Pedro Domingos

15

Page 16: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Five Tribes of Machine Learning

• Evolutionaries (基因演化法)

• Connectionists (類神經網路)

• Symbolists (歸納法)

• Bayesians (貝氏機率)

• Analogizers (類比近似)

16

Page 17: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Five Tribes of Machine Learning

•Symbolists: Decision Trees, Random Forest

•Bayesians: Naïve Bayesians

•Analogizers: SVM, k-NN

•Evolutionaries: Gene algorithms

•Connectionists: Deep Learning

17

Page 18: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

All Algorithms can be Reduced to 3 Operations

1

0

0 0

1

0

1 1

18

Page 19: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

XOR1

10

19

Page 20: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

OK, machine learning is cool. But what is

Deep Learning?

Page 21: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

21

Page 22: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Neuron22

Page 23: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Frank Rosenblatt’s Perceptron (1957)

23

Page 24: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

24

Page 25: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

25

Page 26: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

26

Page 27: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Deep Learning

27

Page 28: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

28

Page 29: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Learning XOR (1986)Geoffrey Hinton

29

Page 30: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Backpropagation

30

Page 31: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Chain Rule

31

Page 32: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Computation Graph

c = a + b

d = b + 1

e = c*d

32

Page 33: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

MNIST database of Handwritten Digits

33

Page 34: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

34

Page 35: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

35

Page 36: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

36

Page 37: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

37

Page 38: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

38

Page 39: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

39

Page 40: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

40

Page 41: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Gradient Descent

41

Page 42: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

42https://hackernoon.com/gradient-descent-aynk-7cbe95a778da

Page 43: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Cost Function

•Mean-Squared Error

43

𝐽 𝜃 =1

𝑁

𝑖=1

𝑁

𝑓𝜃 𝑥𝑖 − 𝑦𝑖2

Page 44: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Gradient Descent of MSE

• Gradient of MSE

• Update

• Repeat until Convergence

44

𝜕𝐽 𝜃

𝜕𝜃=2

𝑁

𝑖=1

𝑁

𝑓𝜃 𝑥𝑖 − 𝑦𝑖 𝑓𝜃′ 𝑥𝑖

𝜃𝑗 ← 𝜃𝑗 − 𝛼𝜕𝐽 𝜃

𝜕𝜃𝑗

Page 45: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

45

Page 46: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

46

Page 47: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Convolutional Neural Network (LeNet-5)

• https://medium.com/@sh.tsang/paper-brief-review-of-lenet-1-lenet-4-lenet-5-boosted-lenet-4-image-classification-1f5f809dbf17

Page 48: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

48

Page 49: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

ImageNet Large Scale Visual Object Recognition Challenge (ILSVRC)• 1000 categories

• For ILSVRC 2017− Training images for each category ranges from 732 to 1300

− 50,000 validation images and 100,000 test images.

• Total number of images in ILSVRC 2017 is around 1,150,000

49

Page 50: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Convolutional Neural Network

• Alex Krizhevsky, Geoffrey Hinton et al., 2012

50

Page 51: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Previous Winners of ILSVRC

51

Page 52: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Deep Reinforcement Learning

52

Page 53: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Reinforcement Learning

Page 54: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

54

Page 55: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AlphaGo

55

Page 56: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

The Complexity of Go vs Chess

56

Page 57: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Reinforcement Learning

• An agent learns how to do actions at to achieve maximum reward R

• Policy π(at|st): agent’s behavior function

• Value function V: evaluate quality of each action/state

• Model: agent’s representation of the environment

Policy

57

Page 58: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Learn to Play Atari Games

• Mnih et al., “Human Level Control through Deep Reinforcement Learning,” Nature, 2015

58

Page 59: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

DRL in Atari

Page 60: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AlphaGo Zero

60

Page 61: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

61

Page 62: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

62

Page 63: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Virtual-to-real Learning• Inspired by DeepMind (Mnih et al., Nature, 2015)

− “Human Level Control through Deep Reinforcement Learning”

• Applied to computer vision applications− Image segmentation: Armeni et al. (2016), Qiu et al., (2017)− Indoor navigation: Brodeur et al. (2017), Gupta et al. (2017), Savva et al.

(2017), Wu et al. (2018)− Autonomous vehicles: Marinez et al. (2017), Muller et al. (2018), Pan et al.

(2017), Shah et al. (2018)

63

UnrealCV CAD2Real

Page 64: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

64

Semantic Segmentation

Depth Prediction

VIVID

Autonomous Navigation

Action Recognition

Page 65: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Simulate Real-life Events

65

Page 66: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Searching for the Shooter

66

Page 67: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

DeepDrive

67

Page 68: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Limits of Deep Learning

68

Page 69: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

No Idea of Real World

69

Page 70: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Adversarial Attack

70

Page 71: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Number of Connections in the Brain

Neurons (for adults):

10^11, or 100 billion, 100000000000

Synapses (based on 1000 per neuron):

10^14, or 100 trillion, 100000000000000

71

Page 72: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Generative Adversarial Networks (GAN)

72

Page 73: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Generative Adversarial Networks (GAN)

• Ian Goodfellow

73

Page 74: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Painting like Van Gogh

74

Page 75: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Super Resolution

75

Page 76: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

DeepFake: Is this you?

76

Page 77: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

Google’s AutoML

• Learning neural network cells automatically

77https://ai.googleblog.com/2017/11/automl-for-large-scale-image.html

Page 78: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

AutoML on ImageNet

78

Page 79: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

EfficientNet (May, 2019)

79

Page 80: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

80

Page 81: Introduction to Deep Learning...−Training images for each category ranges from 732 to 1300 −50,000 validation images and 100,000 test images. •Total number of images in ILSVRC

References• Francois Chollet, “Deep Learning with Python.” Chapter 1

• What is backpropagation really doing? ( 3Blue1Brown) https://www.youtube.com/watch?v=Ilg3gGewQ5U

• http://www.andreykurenkov.com/writing/ai/a-brief-history-of-neural-nets-and-deep-learning/

• https://pmirla.github.io/2016/08/16/AI-Winter.html

• https://tw.saowen.com/a/6cdc2f1279016e566832bb1234e06d321992dd1fabcdf4a2e0a3e16fc0dc09dc

• https://ai.googleblog.com/2019/05/efficientnet-improving-accuracy-and.html

• https://hackernoon.com/gradient-descent-aynk-7cbe95a778da

• http://cdn.aiindex.org/2018/AI%20Index%202018%20Annual%20Report.pdf

81