What is dim1 of shape param in the data layer?

838 views
Skip to first unread message

SRQ

unread,
Apr 19, 2016, 3:50:43 AM4/19/16
to Caffe Users
I'm sorry for the noob question. What is the dimension in bold represented in the data layer below? I understand dim3,4 are 227 as alexnet input is 227x227 and dim 2 is 3 due to RBG image. what does the 10 represent here? This layer is absolutely necessary in deploy.prototxt as we need to input data to first layer which is the convolution layer. Am I correct in assuming this?

layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim: 10 dim: 3 dim: 227 dim: 227 } }
}

Jan

unread,
Apr 19, 2016, 6:37:41 AM4/19/16
to Caffe Users
Yes, this layer exists only to define the names and shapes of the input blobs. The actual data is then put into the blobs using the API.

The 10 (the first dim) is simply the batchsize: how many images/samples are fed through the network in parallel. The number set in the deploy config is not critical as it is simple to resize this dimension of the input blobs through the API (resizing the other dims is a completely different matter though!).

Jan
Reply all
Reply to author
Forward
0 new messages