吴恩达深度学习学习笔记——C4W1——卷积神经网络——练习题

这篇博客探讨了卷积神经网络的基础知识,包括滤波器对灰度图像的影响、不同层的参数数量计算、卷积层与池化层的输出尺寸以及参数共享和稀疏连接的优势。涉及的内容涵盖了从基本的卷积操作到网络架构的设计考虑,如填充和步长的选择,以及池化层在反向传播中的作用。同时,强调了池化层虽然不直接影响前向传播的参数,但会影响反向传播过程。
摘要由CSDN通过智能技术生成

C4W1 Quiz - The basics of ConvNets

20230612 updated:

 

 

 

Ans: C

Ans: D

Note: 100*(300*300*3)+100 = 27000100

Ans: B

Note: 5*5*100 + 100 = 2600

Ans: C

Note: n=63, f=7, nC=32, s=2, p=0

nH=nW=(n+2p-f)/s+1=(63-7)/2+1=29

Shape of output: nH*nW*nC= 29*29*32

Ans: C

Note: n=15, p=2, nC=8

nH=nW=n+2p=19

Shape of input: nH*nW*nC= 19*19*8

Ans: C

Note: n=63, s=1, f=7

(n+2p-f)/s+1=n => p=((n-1)*s-n+f)/2=(f-1)/2=(7-1)/2=3

Ans:

Note: n=32, nC=16, s=2

nH=nW=n/s=32/2=16

Shape of output: nH*nW*nC= 16*16*16

Ans: False

Note: 由卷积层->池化层作为一个layer,在前向传播过程中,池化层里保存着卷积层的各个部分的最大值/平均值,然后由池化层传递给下一层,在反向传播过程中,由下一层传递梯度过来,“不影响反向传播的计算”这意味着池化层到卷积层(反向)没有梯度变化,梯度值就为0,既然梯度值为0,那么例如在W[l]=W[l]−α×dW[l]的过程中,参数W[l]=W[l]−α×0,也就是说它不再更新,那么反向传播到此中断。所以池化层会影响反向传播的计算。

Ans: B、C

Ans: B

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

 [[0 1 -1  0][ 1 3 -3 -1][ 1 3 -3 -1][ 0 1 -1  0]]

Ans: Detect vertical edges

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)?

Ans: 27,000,100

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)?

Ans: 2600

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?

Ans: 29x29x32

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)?

Ans:  19x19x8

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?

Ans:  3

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?

Ans:  16x16x16

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

Ans:  False

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.)

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

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

10. In lecture we talked about “sparsity of connections” as a benefit of using convolutional layers. What does this mean?

Ans: Each activation in the next layer depends on only a small number of activations from the previous layer.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值