public:
explicit BasePrefetchingDataLayer(const LayerParameter& param)
: BaseDataLayer<Dtype>(param) {}
- virtual ~BasePrefetchingDataLayer();
+ virtual ~BasePrefetchingDataLayer() {}
virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top);
public:
explicit ImageDataLayer(const LayerParameter& param)
: BasePrefetchingDataLayer<Dtype>(param) {}
- virtual ~ImageDataLayer() {}
+ virtual ~ImageDataLayer();
virtual void DataLayerSetUp(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top);
public:
explicit WindowDataLayer(const LayerParameter& param)
: BasePrefetchingDataLayer<Dtype>(param) {}
- virtual ~WindowDataLayer() {}
+ virtual ~WindowDataLayer();
virtual void DataLayerSetUp(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top);
}
template <typename Dtype>
-BasePrefetchingDataLayer<Dtype>::~BasePrefetchingDataLayer<Dtype>() {
- JoinPrefetchThread();
-}
-
-template <typename Dtype>
void BasePrefetchingDataLayer<Dtype>::CreatePrefetchThread() {
this->phase_ = Caffe::phase();
this->data_transformer_.InitRand();
template <typename Dtype>
DataLayer<Dtype>::~DataLayer<Dtype>() {
+ this->JoinPrefetchThread();
// clean up the database resources
switch (this->layer_param_.data_param().backend()) {
case DataParameter_DB_LEVELDB:
}
template <typename Dtype>
+ImageDataLayer<Dtype>::~ImageDataLayer<Dtype>() {
+ this->JoinPrefetchThread();
+}
+
+template <typename Dtype>
void ImageDataLayer<Dtype>::DataLayerSetUp(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top) {
const int new_height = this->layer_param_.image_data_param().new_height();
}
template <typename Dtype>
+WindowDataLayer<Dtype>::~WindowDataLayer<Dtype>() {
+ this->JoinPrefetchThread();
+}
+
+template <typename Dtype>
void WindowDataLayer<Dtype>::DataLayerSetUp(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top) {
// LayerSetUp runs through the window_file and creates two structures