the number of neurons in AlexNet

余生颓废 提交于 2019-12-08 00:15:05

问题


In AlexNet,the image data is 3*224*224.

The first convolutional layer filters the image with 96 kernels of size 11*11*3 with a stride of 4 piexels.

I have doubt with the first layer's output neurons count.

In my opinion,the input is 224*224*3=150528,then the output should be 55*55*96=290400

But in the paper,they described the output is 253440

I don't know how to calculate the number of this layer's neurons.

Is there someone could help me?Thank you!


回答1:


It seems like the input size is 227x227, without padding. I also think that what they mention in the paper is a mistake. Have look at this link.

http://cs231n.github.io/convolutional-networks/

It mentions following information.

The Krizhevsky et al. architecture that won the ImageNet challenge in 2012 accepted images of size [227x227x3]. On the first Convolutional Layer, it used neurons with receptive field size F=11, stride S=4 and no zero padding P=0. Since (227 - 11)/4 + 1 = 55, and since the Conv layer had a depth of K=96, the Conv layer output volume had size [55x55x96]. Each of the 55*55*96 neurons in this volume was connected to a region of size [11x11x3] in the input volume. Moreover, all 96 neurons in each depth column are connected to the same [11x11x3] region of the input, but of course with different weights. As a fun aside, if you read the actual paper it claims that the input images were 224x224, which is surely incorrect because (224 - 11)/4 + 1 is quite clearly not an integer. This has confused many people in the history of ConvNets and little is known about what happened. My own best guess is that Alex used zero-padding of 3 extra pixels that he does not mention in the paper.




回答2:


I also believe this is a mistake by the author, I found a proof in the courseware of stanford cs231n, in the 10th and 11th page, you can find that the output size of the first conv is 290400.



来源:https://stackoverflow.com/questions/36733636/the-number-of-neurons-in-alexnet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!