What does "Memory required for data:" measure?
Here is the output of debug minist_letnet :
I1203 18:47:00.397809 4610 net.cpp:170] relu1 needs backward computation. I1203 18:47:00.397816 4610 net.cpp:170] ip1 needs backward computation. I1203 18:47:00.397825 4610 net.cpp:170] pool2 needs backward computation. I1203 18:47:00.397832 4610 net.cpp:170] conv2 needs backward computation. I1203 18:47:00.397843 4610 net.cpp:170] pool1 needs backward computation. I1203 18:47:00.397851 4610 net.cpp:170] conv1 needs backward computation. I1203 18:47:00.397860 4610 net.cpp:172] label_mnist_1_split does not need backward computation. I1203 18:47:00.397867 4610 net.cpp:172] mnist does not need backward computation. I1203 18:47:00.397874 4610 net.cpp:208] This network produces output accuracy I1203 18:47:00.397884 4610 net.cpp:208] This network produces output loss I1203 18:47:00.397905 4610 net.cpp:467] Collecting Learning Rate and Weight Decay. I1203 18:47:00.397915 4610 net.cpp:219] Network initialization done. I1203 18:47:00.397923 4610 net.cpp:220] Memory required for data: 8086808
memory required for data 8086808 is the total caffe needed for gpu , or only for input data(mnist)? the 8006808 is Byte?or bit ?
Yeah, the memory requirement reported by caffe seems to have no correlation with either the actual memory used on the GPU or the file size of the .caffemodel.
So, what does it mean?
Is it the amount of memory set aside for prefetching the data?
It's the memory required for all the top blobs or "data" in the sense of layer outputs. It excludes the diffs, the parameters, and any intermediate blobs within layers. @jeffdonahue do you remember the motivation for this number?
Ah, so it's sizeof(data layer input) + sizeof(label layer input), in most cases? That doesn't seem particularly useful information.
Is is possible to report the max amount of memory that is going to be used by the GPU? That would be super useful for auto-tuning the batch-size. I fear that it's not possible because of this comment, but I don't understand why.
@lukeyeager, no, @shelhamer means the memory for all top blobs, i.e., all "intermediate" data, not counting parameters and layer-specific buffers. (In DEBUG mode, you also get the total memory requirement printed after each layer is created.) Since layers are individually responsible for allocating parameters and buffers, there's no way in general to know the total amount of memory required except by running a forward pass.
For additional usage questions, please ask on caffe-users. Thanks!
I will check the code to see this, I thought it's an very important information for me !
Can I ask a question,what does the "XX does not need backward computation"mean? At the end of training