python - Setting batch_size in data_param for Caffe has no effect -


when set 'batch_size' in deploy.prototxt file in google deep dream bvlc_googlenet lower gpu memory requirements, has no effect on speed nor memory requirements. it's if ignored. know file (deploy.prototxt) being used because other changes reflected in results that's not issue. tried set batch_size on related layers ("inception_4c/1x1", etc), again no difference.

this how i'm setting it:

layer {   name: "inception_4c/output"   type: "concat"   bottom: "inception_4c/1x1"   bottom: "inception_4c/3x3"   bottom: "inception_4c/5x5"   bottom: "inception_4c/pool_proj"   top: "inception_4c/output"   data_param {     batch_size 1   } } 

when time runtime of script, it's same batch_size 1 , batch_size 512, there no difference.

what doing wrong?

data_param parameter of input data layer. can set batch_size input , value propagates through network.

in deploy.prototxt batch size set first 'input_dim' argument (third line), try changing value , see if has effect on memory consumption of network.

the first few lines of deploy.prototxt file should interpreted as

input: "data"  # "top" name of input layer input_dim: 10  # 4th dimension - batch size input_dim: 3   # 3rd dimension - number of channels input_dim: 224 # 2nd dimension - height of input input_dim: 224 # 1st dimension - width of input 

thus, expect @ fist conv layer ("conv1/7x7_s2") "bottom" named "data" shape 10-by-3-by-224-by-224.


Comments