I have a prototxt like this:
name: "CaffeNet"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 100
mean_file: []
but my image size in lmdb are 100X200, the only way make this net to work is to set crop_size
to 100
, Is Caffe ruining my images and crop it from center ? Is there any way to fix it ? What i remove crop size at all?
PS : If i remove crop size i will get
Source param shape is 4096 3072 (12582912); target param shape is 4096 1024 (4194304)
And i saw this question but there is no filed to put my calculation for each layer out put, we just define num_output
for fully connected layer.
Although calculation of output each layer is not so hard with:
output_net = (input_net+(2*pad)-kernel_size)/(stride+1) * num_output(or fillters)
data(100X200X3)
conv1(((100X200X3)+(2*0)-11)/(4+1)) * 96 = ((60000 -11) /5) * 96 = 1151788.8
pool1((input_net+(2*0)-3)/(2+1)) = (1151788.8 -3) /3 = 383928.6
conv2((input_net+(2*2)-5)/(1+1)) * 256 = ((383928.6 + (4) -5) /5) * 256 = ((383928.6 + -1) /5) * 256 = 19657093.12
pool2((input_net+(2*0)-3)/(2+1)) = (19657093.12 -3) /3 = 6552363.373333333
conv3((input_net+(2*1)-3)/(1+1)) * 384 = ((6552363.373333333 + (2) -5) /2) * 384 = 3276180.186666667 * 384 = 1258053191.679999936
conv4((input_net+(2*1)-3)/(1+1)) * 384 = ((1258053191.679999936 + (2) -5) /2) * 384 = 629026594.339999968 * 384 = 241546212226.559987712
conv5((input_net+(2*1)-3)/(1+1)) * 256 = ((241546212226.559987712 + (2) -5) /2) * 256 = 120773106111.779993856 * 256 = 3.091791516×10¹³
How can i precede from here and correct network ? And caffe said 12582912 but it is not after my calculation. if I've calculate it right.