diff --git a/include/caffe/layers/base_conv_layer.hpp b/include/caffe/layers/base_conv_layer.hpp index 0160a833dd2..8cdbd2d1b43 100644 --- a/include/caffe/layers/base_conv_layer.hpp +++ b/include/caffe/layers/base_conv_layer.hpp @@ -165,7 +165,9 @@ class BaseConvolutionLayer : public Layer { int col_offset_; int output_offset_; - Blob col_buffer_; + // N.B. sharing the col buffer reduces memory but interferes with + // ND conv and parallelism + static Blob col_buffer_; Blob bias_multiplier_; }; diff --git a/src/caffe/layers/base_conv_layer.cpp b/src/caffe/layers/base_conv_layer.cpp index 35c90145e31..38cc6dcc0b7 100644 --- a/src/caffe/layers/base_conv_layer.cpp +++ b/src/caffe/layers/base_conv_layer.cpp @@ -8,6 +8,9 @@ namespace caffe { +template +Blob BaseConvolutionLayer::col_buffer_; + template void BaseConvolutionLayer::LayerSetUp(const vector*>& bottom, const vector*>& top) {