diff options
-rw-r--r-- | include/caffe/layers/base_data_layer.hpp | 3 | ||||
-rw-r--r-- | src/caffe/layers/base_data_layer.cpp | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/include/caffe/layers/base_data_layer.hpp b/include/caffe/layers/base_data_layer.hpp index 925b019d..21d3ada5 100644 --- a/include/caffe/layers/base_data_layer.hpp +++ b/include/caffe/layers/base_data_layer.hpp @@ -67,9 +67,6 @@ class BasePrefetchingDataLayer : virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top); - // Prefetches batches (asynchronously if to GPU memory) - static const int PREFETCH_COUNT = 4; // same as proto - protected: virtual void InternalThreadEntry(); virtual void load_batch(Batch<Dtype>* batch) = 0; diff --git a/src/caffe/layers/base_data_layer.cpp b/src/caffe/layers/base_data_layer.cpp index 9414f6f9..93a798f3 100644 --- a/src/caffe/layers/base_data_layer.cpp +++ b/src/caffe/layers/base_data_layer.cpp @@ -36,8 +36,7 @@ template <typename Dtype> BasePrefetchingDataLayer<Dtype>::BasePrefetchingDataLayer( const LayerParameter& param) : BaseDataLayer<Dtype>(param), - prefetch_(param.has_data_param() ? - param.data_param().prefetch() : PREFETCH_COUNT), + prefetch_(param.data_param().prefetch()), prefetch_free_(), prefetch_full_(), prefetch_current_() { for (int i = 0; i < prefetch_.size(); ++i) { prefetch_[i].reset(new Batch<Dtype>()); |