[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Convolutional Neural Networks

1.1 Computer Vision

why to learn cv 

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

network for large images

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

1.2 Edge Detection Example

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

py: conv_forward

tensorflow: tf.nn.conv2d

keras: Con2D

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Here are another convolutional computation:

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

more edge detection

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Padding

nxn * fxf = (n-f+1)x(n-f+1)

p = padding

After padding n by n pixels, it turns to be n+2p by n+2p pixels

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

valid&same convolution(f-odd num)

f - the size of filter

Valid: n x n  *  f x f = (n-f+1) x (n-f+1)

Same: the output size is the same as the input size

When it is the same convolutions: p = (f - 1) / 2

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Strided convolutions

stride means each step, the box will jump [stide] steps to compute the outcome

s = stride

p = padding

n x n  *  f x f = [(1/s)x(n+2p-f)+1]  *  [(1/s)x(n+2p-f)+1]

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

"convolution" or "criss-correlation"

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

but it does not matter

Convolution Over Volume

Convolutions on RGB images: N x N x 3

height x width x #channels

f(the size of the filter) x f x #channels

multiple filters

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

One Layer of a Convolutional Network

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

summary

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Simple Convolutional Network Example

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Pooling layer

max pooling

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

average pooling

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

CNN Example

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)

Why Convolutions?

parameter sharing

sparsity of connections

[coursera/ConvolutionalNeuralNetworks/week1]Foundations of cnn(summary&question)


ques:

The basics of ConvNets

What do you think applying this filter to a grayscale image will do?

[0110133113310110][Math Processing Error]

Detect vertical edges

Detect image contrast

Detect 45 degree edges

Detect horizontal edges

Question 2
1
point

2. Question 2

Suppose your input is a 300 by 300 color (RGB) image, and you are not using a convolutional network. If the first hidden layer has 100 neurons, each one fully connected to the input, how many parameters does this hidden layer have (including the bias parameters)?

9,000,001

9,000,100

27,000,001

27,000,100

Question 3
1
point

3. Question 3

Suppose your input is a 300 by 300 color (RGB) image, and you use a convolutional layer with 100 filters that are each 5x5. How many parameters does this hidden layer have (including the bias parameters)?

2501

2600

7500

7600

Question 4
1
point

4. Question 4

You have an input volume that is 63x63x16, and convolve it with 32 filters that are each 7x7, using a stride of 2 and no padding. What is the output volume?

16x16x32

29x29x16

29x29x32

16x16x16

Question 5
1
point

5. Question 5

You have an input volume that is 15x15x8, and pad it using “pad=2.” What is the dimension of the resulting volume (after padding)?

17x17x8

17x17x10

19x19x8

19x19x12

Question 6
1
point

6. Question 6

You have an input volume that is 63x63x16, and convolve it with 32 filters that are each 7x7, and stride of 1. You want to use a “same” convolution. What is the padding?

1

2

3

7

Question 7
1
point

7. Question 7

You have an input volume that is 32x32x16, and apply max pooling with a stride of 2 and a filter size of 2. What is the output volume?

15x15x16

16x16x8

32x32x8

16x16x16

Question 8
1
point

8. Question 8

Because pooling layers do not have parameters, they do not affect the backpropagation (derivatives) calculation.

True

False

Question 9
1
point

9. Question 9

In lecture we talked about “parameter sharing” as a benefit of using convolutional networks. Which of the following statements about parameter sharing in ConvNets are true? (Check all that apply.)

It allows a feature detector to be used in multiple locations throughout the whole input image/input volume.

It allows parameters learned for one task to be shared even for a different task (transfer learning).

It reduces the total number of parameters, thus reducing overfitting.

It allows gradient descent to set many of the parameters to zero, thus making the connections sparse.