BVLC/caffe — pull request #517 by sguada (2014-06-19 01:26:49+00:00)
Title: Virtual blob and shared_col_buffer

This PR introduces a `VirtualBlob` that has dimensions but not `data` or `diff`. To be used it needs to `ShareData` or `ShareDiff` with a real `Blob`.

Inspired by conversations with @forresti about using a shared_col_buffer between different `ConvolutionLayers`, this PR uses VirtualBlob to create a VirtualBlob `col_buffer` in the `ConvolutionLayers` and a Blob `shared_buffer_` in the `Net`.

The size of the `shared_buffer_` will be maximum of the sizes of the shared `col_buffer`.

By default, any `ConvolutionLayer` would use a shared `col_buffer`, but it can have its own `col_buffer` by setting the corresponding `ConvolutionParam.shared_col_buffer` to `false` in the `prototxt`.

This PR further reduces the memory consumption of Caffe.