I noticed how the Caffe MNIST example prototxt file allows for up to 64 images to be passed to the network at a time.
Is there a limit for how high I can set this number?
Could I (for example) set this number to 200 or even 500 so that I can accept up to 200/500 images at a time without it impacting the predictions negatively?
Asked
Active
Viewed 788 times
1

Shai
- 111,146
- 38
- 238
- 371

Jack Simpson
- 1,681
- 3
- 30
- 54
1 Answers
2
The only limit is your machine's memory: When caffe loads the model it allocates memory for all the parameters and all the intermediate data blobs. The more images you process concurrently, the larger the memory you need to allocate in advance.
The easiest (and crudest) way of determining this number is simply trail-and-error, try setting it to 200 and see if you get an "out of memory" error when loading the model.
Note that the number of images you can process at the same time depends also on whether you are using GPU or CPU: usually GPU memory is smaller than CPU memory and thus allows you to process fewer images.

Shai
- 111,146
- 38
- 238
- 371