Skip to content

Commit

Permalink
Merge pull request BVLC#2016 from shelhamer/share-col-buffer
Browse files Browse the repository at this point in the history
Share convolution buffers to reduce memory usage
  • Loading branch information
ellery committed Apr 24, 2015
2 parents 2dd61dc + 1dcfc3c commit 12d29cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/caffe/vision_layers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BaseConvolutionLayer : public Layer<Dtype> {
int col_offset_;
int output_offset_;

Blob<Dtype> col_buffer_;
static Blob<Dtype> col_buffer_;
Blob<Dtype> bias_multiplier_;
};

Expand Down
3 changes: 3 additions & 0 deletions src/caffe/layers/base_conv_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

namespace caffe {

template <typename Dtype>
Blob<Dtype> BaseConvolutionLayer<Dtype>::col_buffer_;

template <typename Dtype>
void BaseConvolutionLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
Expand Down

0 comments on commit 12d29cd

Please sign in to comment.