How many images can you pass to Caffe at a time?

流过昼夜 提交于 2019-12-24 17:04:18

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/32589349/how-many-images-can-you-pass-to-caffe-at-a-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!