question about deploy.prototxt

42 views
Skip to first unread message

Yawei Lu

unread,
Jul 17, 2017, 3:28:54 AM7/17/17
to Caffe Users
In deploy.prototxt, the input shape is defined as

shape: { dim: 10 dim: 3 dim: 224 dim: 224 }

I know the meaning of the last 3 dims. They define the channel, height, and weight of an image. But what is the meaning of the first dim? Why is it 10?

I know that the first dim is the batchsize in train_val.prototxt. I set the first dim to be 10, and predict one image each time. If its meaning is still batchsize, why do I get no error or warning? 

Thanks!

Przemek D

unread,
Jul 17, 2017, 9:35:42 AM7/17/17
to Caffe Users
First dimension indeed is the batch size. So there's no reason for you to get any errors - if you have a batch of 10 but only pass one image, in fact you're passing 10 images, just 9 of them empty. You could set the first dim to 1 to improve performance.

Yawei Lu

unread,
Jul 18, 2017, 10:46:56 PM7/18/17
to Caffe Users
Your reply really answers my question. Thanks a lot!

在 2017年7月17日星期一 UTC+8下午9:35:42,Przemek D写道:
Reply all
Reply to author
Forward
0 new messages