convolutional neural networkscis581/lectures/fall2018/cnn-intr… · convolutional neural network...

165
Books » http://www.deeplearningbook.org/

Upload: others

Post on 01-Oct-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Books» http://www.deeplearningbook.org/

Page 2: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Bookshttp://neuralnetworksanddeeplearning.com/.org/

Page 3: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

reviews» http://www.deeplearningbook.org/contents/linear_algebra.html» http://www.deeplearningbook.org/contents/prob.html» http://www.deeplearningbook.org/contents/numerical.html

Page 4: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Convolutional Neural Networks

Page 5: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A
Page 6: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Input: Output:

Goal: Given an image, we want to identify what class that image belongs to.

Page 7: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Input

OutputConvolutional Neural Network (CNN)

Pipeline:

A Monitor

Page 8: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Convolutional Neural Nets (CNNs) in a nutshell:• A typical CNN takes a raw RGB image as an input.• It then applies a series of non-linear operations on top

of each other.• These include convolution, sigmoid, matrix

multiplication, and pooling (subsampling) operations.• The output of a CNN is a highly non-linear function of

the raw RGB image pixels.

Page 9: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

How the key operations are encoded in standard CNNs:• Convolutional Layers: 2D Convolution• Fully Connected Layers: Matrix Multiplication• Sigmoid Layers: Sigmoid function• Pooling Layers: Subsampling

Page 10: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

2D convolution:

- convolutional weights of size MxN

- the values in a 2D grid that we want to convolve

A sliding window operation across the entire grid .

h f g= ⊗

0 0

M N

ijm n

h f i m j n g m n= =

= − −∑∑ ( , ) ( , )

Page 11: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

0 0 0

0 1 0

0 0 0

0.107 0.113 0.107

0.113 0.119 0.113

0.107 0.113 0.107

-1 0 1

-2 0 2

-1 0 1

Unchanged Image Blurred Image Vertical Edges

1f g⊗ 2f g⊗ 3f g⊗

Page 12: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

0 0 0

0 1 0

0 0 0

0.107 0.113 0.107

0.113 0.119 0.113

0.107 0.113 0.107

-1 0 1

-2 0 2

-1 0 1

CNNs aim to learn convolutional weights directly from the data

Page 13: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Input: Convolutional Neural Network (CNN)

Early layers learn to detect low level structures such as oriented edges, colors and corners

Page 14: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Input: Convolutional Neural Network (CNN)

Deep layers learn to detect high-level object structures and their parts.

Page 15: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A Closer Look inside the Convolutional Layer

A Chair Filter

A Person Filter

A Table Filter

A Cupboard Filter

Input Image

Page 16: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Fully Connected Layers:

Page 17: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Fully Connected Layers:

matrix multiplication

Page 18: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A
Page 19: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

https://medium.com/@yu4u/why-mobilenet-and-its-variants-e-g-shufflenet-are-fast-1c7048b9618d

Page 20: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Max Pooling Layer:

• Sliding window is applied on a grid of values.• The maximum is computed using the values in the

current window.

1 2 3

4 5 6

7 8 9

Page 21: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Max Pooling Layer:

5

• Sliding window is applied on a grid of values.• The maximum is computed using the values in the

current window.

1 2 3

4 5 6

7 8 9

Page 22: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Max Pooling Layer:

5 6

• Sliding window is applied on a grid of values.• The maximum is computed using the values in the

current window.

1 2 3

4 5 6

7 8 9

Page 23: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Max Pooling Layer:

5 6

8 9

• Sliding window is applied on a grid of values.• The maximum is computed using the values in the

current window.

1 2 3

4 5 6

7 8 9

Page 24: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Sigmoid Layer:

• Applies a sigmoid function on an input

Page 25: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Let us now consider a CNN with a specific architecture:• 2 convolutional layers.• 2 pooling layers.• 2 fully connected layers.• 3 sigmoid layers.

Convolutional Networks

Page 26: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 27: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 28: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 29: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 30: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 31: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 32: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 33: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 34: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 35: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Convolutional Networks

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 36: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 37: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

Final Predictions

- sigmoid function - softmax function

Page 38: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

Convolutional layer parameters in layers 1 and 2

- sigmoid function - softmax function

Page 39: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

Fully connected layer parameters in the fully connected layers 1 and 2

- sigmoid function - softmax function

Page 40: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function - softmax function

Page 41: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

1.

- sigmoid function - softmax function

Page 42: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

1.

2.

- sigmoid function - softmax function

Page 43: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

1.

2.

3.

- sigmoid function - softmax function

Page 44: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer

1.

2.

3.

4.

- sigmoid function - softmax function

Page 45: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward Pass:

- convolutional layer output

Notation:- fully connected layer output

- pooling layer - sigmoid function

Key Question: How to learn the parameters from the data?

- softmax function

Page 46: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagation

for

Convolutional Neural Networks

Page 47: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

How to learn the parameters of a CNN?

• Assume that we are a given a labeled training dataset

• We want to adjust the parameters of a CNN such that CNN’s predictions would be as close to true labels as possible.

• This is difficult to do because the learning objective is highly non-linear.

Prediction True Label

Page 48: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Gradient descent: • Iteratively minimizes the objective function.• The function needs to be differentiable.

Page 49: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Gradient descent: • Iteratively minimizes the objective function.• The function needs to be differentiable.

Page 50: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Gradient descent: • Iteratively minimizes the objective function.• The function needs to be differentiable.

Page 51: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Gradient descent: • Iteratively minimizes the objective function.• The function needs to be differentiable.

Page 52: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Compute the gradients of the overall loss

w.r.t. to our predictions and propagate it back:

True Label

Page 53: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

2. Compute the gradients of the overall

loss and propagate it back:

True Label

Page 54: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

3. Compute the gradients to adjust the weights:

True Label

Page 55: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

4. Backpropagate the gradients to previous layers:

True Label

Page 56: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

5. Compute the gradients to adjust the weights:

True Label

Page 57: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

6. Backpropagate the gradients to previous layers:

True Label

Page 58: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

7. Compute the gradients to adjust the weights:

True Label

Page 59: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

8. Backpropagate the gradients to previous layers:

True Label

Page 60: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

9. Compute the gradients to adjust the weights:

True Label

Page 61: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

An Example of

Backpropagation Convolutional Neural Networks

Page 62: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Assume that we have K=5 object classes:

0.5Class 1: PenguinClass 2: BuildingClass 3: ChairClass 4: PersonClass 5: Bird

0 0.1 0.2 0.1

1 0 0 0 0

True Label

Page 63: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

True Label

Page 64: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

where

True Label

Page 65: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

where

True Label

Page 66: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

where

True Label

Page 67: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

where

True Label

Page 68: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

True Label

Page 69: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

True Label

Page 70: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

True Label

Page 71: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Assume that we have K=5 object classes:

0.5Class 1: PenguinClass 2: BuildingClass 3: ChairClass 4: PersonClass 5: Bird

0 0.1 0.2 0.1

1 0 0 0 0

True Label

Page 72: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Assume that we have K=5 object classes:

0.5Class 1: PenguinClass 2: BuildingClass 3: ChairClass 4: PersonClass 5: Bird

0 0.1 0.2 0.1

1 0 0 0 0

-0.5 0 0.1 0.2 0.1

True Label

Page 73: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Assume that we have K=5 object classes:

0.5Class 1: PenguinClass 2: BuildingClass 3: ChairClass 4: PersonClass 5: Bird

0 0.1 0.2 0.1

1 0 0 0 0

-0.5 0 0.1 0.2 0.1

Increasing the score corresponding to the true class decreases the loss.

True Label

Page 74: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Assume that we have K=5 object classes:

0.5Class 1: PenguinClass 2: BuildingClass 3: ChairClass 4: PersonClass 5: Bird

0 0.1 0.2 0.1

1 0 0 0 0

-0.5 0 0.1 0.2 0.1

Decreasing the score of other classes also decreases the loss.

True Label

Page 75: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 76: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Need to compute the following gradient

Adjusting the weights:

True Label

Page 77: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Page 78: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

was already computed in the previous step

Adjusting the weights:

Need to compute the following gradient

True Label

Page 79: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Page 80: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

where

Need to compute the following gradient

True Label

Page 81: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

where

Need to compute the following gradient

True Label

Page 82: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Update rule:

Need to compute the following gradient

True Label

Page 83: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

True Label

Page 84: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 85: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 86: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

was already computed in the previous step

True Label

Page 87: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 88: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

where

True Label

Page 89: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

where

True Label

Page 90: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 91: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 92: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 93: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 94: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Update rule:

Page 95: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

True Label

Page 96: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 97: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 98: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Page 99: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Page 100: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

was already computed in the previous step

Adjusting the weights:

Need to compute the following gradient

True Label

Page 101: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Page 102: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

where

Need to compute the following gradient

True Label

Page 103: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

where

Need to compute the following gradient

True Label

Page 104: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Update rule:

Need to compute the following gradient

True Label

Page 105: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

True Label

Page 106: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 107: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 108: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

was already computed in the previous step

True Label

Page 109: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 110: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

where

True Label

Page 111: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

where

True Label

Page 112: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 113: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 114: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagating the gradients:

Need to compute the following gradient:

True Label

Page 115: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 116: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

Need to compute the following gradient

True Label

Update rule:

Page 117: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Visual illustration

BackpropagationConvolutional Neural Networks

Page 118: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 119: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Activation unit of interestForward:

Fully Connected Layers:

Page 120: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Activation unit of interest

The weight that is used in conjunction with the activation unit of interest

The output

Forward:

Fully Connected Layers:

Page 121: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 122: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 123: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 124: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backpropagation

Forward:

Fully Connected Layers:

Page 125: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 126: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 127: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Fully Connected Layers:

Page 128: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 129: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A measure how much an activation unit contributed to the loss

Backward:Forward:

Fully Connected Layers:

Page 130: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A measure how much an activation unit contributed to the loss

Backward:Forward:

Fully Connected Layers:

Page 131: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 132: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 133: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 134: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 135: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 136: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Backward:Forward:

Fully Connected Layers:

Page 137: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Summary for fully connected layers

BackpropagationConvolutional Neural Networks

Page 138: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where n denotes the number of

layers in the network.

Summary:

Page 139: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where n denotes the number of

layers in the network.

2. For each fully connected layer :

• For each node in layer set:

Summary:

Page 140: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where n denotes the number of

layers in the network.

2. For each fully connected layer :

• For each node in layer set:

• Compute partial derivatives:

Summary:

Page 141: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where n denotes the number of

layers in the network.

2. For each fully connected layer :

• For each node in layer set:

• Compute partial derivatives:

• Update the parameters:

Summary:

Page 142: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Visual illustration

BackpropagationConvolutional Neural Networks

Page 143: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Convolutional Layers:

1l l la g z +⊗ =( ) ( ) ( )

⊗ =

Page 144: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Convolutional Layers:

1l l la g z +⊗ =( ) ( ) ( )

⊗ =

Page 145: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Forward:

Convolutional Layers:

1l l la g z +⊗ =( ) ( ) ( )

⊗ =

Page 146: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where c denotes the index of a first fully

connected layer.

2. For each convolutional layer :

• For each node in layer set

Summary:

Page 147: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where c denotes the index of a first fully

connected layer.

2. For each convolutional layer :

• For each node in layer set

• Compute partial derivatives:

Summary:

Page 148: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

1. Let , where c denotes the index of a first fully

connected layer.

2. For each convolutional layer :

• For each node in layer set

• Compute partial derivatives:

• Update the parameters:

Summary:

Page 149: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Gradient in pooling layers:

• There is no learning done in the pooling layers• The error that is backpropagated to the pooling layer, is

sent back from to the node where it came from.

True Label

Page 150: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

4 5

7 8

Forward Pass

8

Layer Layer

Gradient in pooling layers:

• There is no learning done in the pooling layers• The error that is backpropagated to the pooling layer, is

sent back from to the node where it came from.

True Label

Page 151: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

0 0

0

Backward Pass

Layer Layer

Gradient in pooling layers:

• There is no learning done in the pooling layers• The error that is backpropagated to the pooling layer, is

sent back from to the node where it came from.

True Label

Page 152: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Recognition as a big table lookup

Y

N

N

Y

Y

N

Y

Y

N

Y

N

Image bitsRecognitionLabel

Image

write down all images in a table and record the object label

Page 153: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

3

18

Each pixel has 2 = 256 values

3x18 image above has 54 pixels

Total possible 54 pixel images = 256

An tiny image example (can you see what it is?)

54

= 1.1 x 10

8

130

Prof. Kanade’s Theorem: we have not seen anything yet!

“How many images are there?”

Page 154: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

3

18

Total possible 54 pixel images = 1.1 x 10130

Total population

10 billion x 1000 x 100 x 356 x 24 x 60 x 60 x 30 = 10 24

Compared

generations days

hours

min/sec

frame rate

We have to be clever in writing down this table!

number of images seen by all humans ever:

years

Page 155: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A Closer Look inside the Convolutional Layer

A Chair Filter

A Person Filter

A Table Filter

A Cupboard Filter

Input Image

Page 156: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A Closer Look inside the Convolutional Layer :

Page 157: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

A Closer Look inside the Back Propagation Convolutional Layer :

Page 158: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 159: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

Training Batch

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Page 160: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

Training Batch

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Page 161: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

Training Batch

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Page 162: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

Adjusting the weights:

True Label

Page 163: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Training Batch

Page 164: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Training Batch

Page 165: Convolutional Neural Networkscis581/Lectures/Fall2018/CNN-intr… · Convolutional Neural Network (CNN) Pipeline: A Monitor. Convolutional Neural Nets (CNNs) in a nutshell: • A

( )

( )

( )

( )

( )

- elementwise multiplication

(performed in a sliding window fashion)

Average the Gradient Across the Batch

Parameter Update

new old

Training Batch