35
Introduction to Deep Learning Introduction (2) Prof. Songhwai Oh ECE, SNU Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 1

Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Introduction to Deep LearningIntroduction (2)

Prof. Songhwai OhECE, SNU

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 1

Page 2: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

LINEAR CLASSIFICATION

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 2

Page 3: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Linear Classifiers

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 3

Linearly SeparableCase

Page 4: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Perceptron Learning Rule

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 4

Threshold function

Update rule: 

(converges if the problem is linearly separable.)

Page 5: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Learning Curve

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 5

Separable case Non‐separable case

Learning curve Learning curve(constant learning rate)

Learning curve(decreasing learning rate)

Page 6: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Logistic Regression

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 6

Logistic function Logistic regression

Soft thresholding

(chain rule)

Page 7: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 7

Separable case Non‐separable case

Learning curve Learning curve(constant learning rate)

Learning curve(decreasing learning rate)

Page 8: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

ARTIFICIAL NEURAL NETWORKS (ANN)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 8

Human brain• 100 billion neurons• 100 to 500 trillion synapses

Page 9: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Neural Network Structure

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 9

• Perceptron: hard thresholding• Sigmoid perceptron: soft thresholding, 

e.g., logistic function

Feed‐forward network Recurrent network

Page 10: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Single‐Layer Feed‐Forward Neural Networks

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 10

• Perceptron learning rule• Logistic regression

Page 11: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 11

Majority function(11 Boolean inputs)

WillWait(Restaurant example)

Page 12: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Multilayer Feed‐Forward Neural Networks

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 12

inputunits

hiddenunits

outputunits

Input units: 

An ANN with a single (sufficiently large) hidden layer can represent any continuous function. 

Page 13: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Back‐Propagation

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 13

Page 14: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

from the jth hidden unit to the kth output

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 14

ak

wj,k

Page 15: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

from the ith input to the jth hidden unit

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 15

ak

wj,kwi,j

Page 16: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Example

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 16

3a

b

2c

d

e

f

g

32

3 2

Computation graph

2 2 2 ∙ ∙ 36 2

Page 17: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Issues

• Overfitting– Complex model– Not enough data

• Vanishing/exploding gradient problem– Cannot train many layers of a network

• Other competing methods– Support vector machines– Bayesian networks

• Breakthroughs– Faster computers, GPUs– Cheap memory (enabling large data)– New techniques

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 17

Page 18: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

DEEP LEARNING

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 18

Page 19: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

ImageNet Large‐Scale Visual Recognition Challenge, 2012

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 19

Tasks:• Decide whether a given image contains a particular type of object or not. For example, a 

contestant might decide that there are cars in this image but no tigers. • Find a particular object and draw a box around it. For example, a contestant might decide that 

there is a screwdriver at a certain position with a width of 50 pixels and a height of 30 pixels.

• 1000 different categories• Over 1 million images• Training set: 456,567 images

Year Winning Error Rate

2010 28.2%

2011 25.8%

2012 16.4% (2nd 25.2%)

2013 11.2%

2014 6.7%

2015 3.57%

Human About 5.1%

ImageNet Large Scale Visual Recognition Challenge. Russakovsky et al. arXiv preprint arXiv:1409.0575. URL: http://arxiv.org/abs/1409.0575v1

Page 20: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Convolutional Neural Networks (CNNs)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 20

• SuperVision (2012)• Deep convolutional neural network• 650,000 neurons• 5 convolutional layers• Over 60 million parameters

• Clarifai (2013)• GoogleLeNet (2014) – 22 layers• ResNet (2015) – 152 layers

Page 21: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

ImageNet Challenge

21K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CVPR, 2016.Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Page 22: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

The Trend

22https://medium.com/@k3083518729/tensorflow‐image‐recognition‐58b0ac77c263

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Page 23: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

The Trend

23

ResNet (CVPR’16 Best Paper)

DenseNet (CVPR’17 Best Paper)

Going deeperGoing denser

K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CVPR, 2016.G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. CVPR, 2017.Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Page 24: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

DEEP REINFORCEMENT LEARNING

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 24

Page 25: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Deep Q‐Network (DQN), 2015• Playing Atari games• Input: Game screen shots• Output: Control (left, right, shoot, …)• Convolutional neural networks (CNN)• Reinforcement learning: Q‐learning

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 25

Breakout Space Invaders

Page 26: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

AlphaGo, 2016

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 26

Google DeepMind’s AlphaGo vs. Lee Sedol, March 2016• Possible board positions of Go: 10170

• cf. Chess: 1047• Monte Carlo tree search• Deep neural networks:

• Value network• Policy network

• Reinforcement learning• Trained from

• 30 million human moves• Playing against itself

• 1,202 CPUs, 176 GPUs

Page 27: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Robotics (OpenAI)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 27

Page 28: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

DEEP LEARNING: SOME RECENT APPLICATIONS

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 28

Page 29: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Language Translation

• Google Neural Machine Translation (GNMT) System

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 29

Source: https://ai.googleblog.com/2016/09/a‐neural‐network‐for‐machine.html

Page 30: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

30Introduction to Deep LearningProf. Songhwai Oh (ECE, SNU)

Language to Action (SNU)

Page 31: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Synthesis

• Speech (WaveNet, Google DeepMind)• Images

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 31

[2]

[1]

[1] Phillip Isola, Jun‐Yan Zhu, Tinghui Zhou, Alexei A. Efros , “Image‐to‐Image Translation with Conditional Adversarial Nets,” CVPR 2017.[2] Karras, T., Aila, T., Laine, S., & Lehtinen, J. Progressive growing of GANs for improved quality, stability, and variation. ICLR 2018.[1] Phillip Isola, Jun‐Yan Zhu, Tinghui Zhou, Alexei A. Efros , “Image‐to‐Image Translation with Conditional Adversarial Nets,” CVPR 2017.[2] Karras, T., Aila, T., Laine, S., & Lehtinen, J. Progressive growing of GANs for improved quality, stability, and variation. ICLR 2018.

Page 32: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Video Synthesis (University of Washington)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 32

Page 33: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Pose Estimation (DensePose, Facebook)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 33

Page 34: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Autonomous Driving (Wayve)

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 34

Page 35: Introduction to Deep Learning - RLLAB @ SNUrllab.snu.ac.kr/courses/deep-learning-2018/files/02_dl_intro_p2.pdf · AlphaGo, 2016 Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning

Wrap Up

• Linear classification• Neural networks

– Backpropagation

• Deep learning• Deep reinforcement learning

Prof. Songhwai Oh (ECE, SNU) Introduction to Deep Learning 35