Some question about Alexnet size

66 views
Skip to first unread message

Teoge

unread,
Apr 24, 2017, 12:26:35 PM4/24/17
to Caffe Users
I am new in caffe and deep learning.
When I setup caffe to train Alexnet, I found out that the tutorials of caffe instruct me to resize the image to size 256x256 before training.
But later I notice that the input size of Alenet is 227x227x3.
And then I went to read the orginal paper of Alexnet, it claims that it uses size 256x256, but it is because it randomly crops the image to achieve data augmetation.
But I searched most of the process of caffe training, and found no evidence of image crop. But since I'm new in caffe, maybe I ignore somthing.

So, my question is: what exactly is the size of input image while training Alexnet using caffe and why?
Hope someone may answer my question. Thank you.

Hieu Do Trung

unread,
Apr 24, 2017, 10:44:35 PM4/24/17
to Caffe Users
In train_val protxt file, you can see this:

transform_param {
mirror: true
crop_size: 227
mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
}

which is the implementation of "randomly crops the image to achieve data augmetation".

Teoge

unread,
Apr 25, 2017, 6:43:53 AM4/25/17
to Caffe Users
Oh, I see it now! Thank you very much for pointing out my ignorance! I didn't fully understand the parameter in prototxt until you told me. I'll read the protocol again carefully. Many thanks!
Reply all
Reply to author
Forward
0 new messages