# What is the input size of Alex net

In the paper ImageNet Classification with Deep Convolutional Neural Networks, the size of input image is 224x224. The following figure shows the input size.

From caffe, deploy.prototxt file from the directory of the bvlc_alexnet says that the input size is 227x227.

Why is the input size different?

• I don't have reputation to comment so I am asking a small follow-up. does the 10 represent batch size and 3 represent the RGB channels? – Shreyas Pimpalgaonkar Jun 11 '18 at 11:21

I guess it has been a mistake. Take a look at here.

The other author's were Ilya Sutskever and Geoffrey Hinton. So, AlexNet input starts with 227 by 227 by 3 images. And if you read the paper, the paper refers to 224 by 224 by 3 images. But if you look at the numbers, I think that the numbers make sense only of actually 227 by 227.

To elaborate on @Media's answer, what is meant by "I think that the numbers make sense only if they're actually 227 by 227" is the following:

In the attached snapshot, the size of the 1st convolution layer is $$55x55$$. Now suppose the dimensions of the input images are $$224x224$$, then by applying the $$11x11$$ kernels with $$stride=4$$ as described in the paper, would result in:

$$outsize=\frac{(insize+2*padding-kernel)}{stride}+1$$

$$outsize=\frac{(224+2*0-11)}{4}+1=54.25$$

Whereas if the dimensions were $$227x227$$, then that would result in:

$$outsize=\frac{(227+2*0-11)}{4}+1=55$$

which conforms with the size of the 1st convolution layer described in the paper.

* I got the formula for calculating the output size from this YouTube tutorial.