1 #ifndef CAFFE_DATA_LAYERS_HPP_ 2 #define CAFFE_DATA_LAYERS_HPP_ 6 #include "caffe/blob.hpp" 7 #include "caffe/data_transformer.hpp" 8 #include "caffe/internal_thread.hpp" 9 #include "caffe/layer.hpp" 10 #include "caffe/proto/caffe.pb.h" 11 #include "caffe/util/blocking_queue.hpp" 20 template <
typename Dtype>
29 virtual void DataLayerSetUp(
const vector<
Blob<Dtype>*>& bottom,
36 const vector<bool>& propagate_down,
const vector<
Blob<Dtype>*>& bottom) {}
38 const vector<bool>& propagate_down,
const vector<
Blob<Dtype>*>& bottom) {}
41 TransformationParameter transform_param_;
42 shared_ptr<DataTransformer<Dtype> > data_transformer_;
46 template <
typename Dtype>
52 template <
typename Dtype>
69 virtual void InternalThreadEntry();
72 vector<shared_ptr<Batch<Dtype> > > prefetch_;
82 #endif // CAFFE_DATA_LAYERS_HPP_ Definition: base_data_layer.hpp:47
Definition: base_data_layer.hpp:53
virtual void Forward_gpu(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Using the GPU device, compute the layer output. Fall back to Forward_cpu() if unavailable.
Definition: layer.hpp:316
An interface for the units of computation which can be composed into a Net.
Definition: layer.hpp:33
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
virtual void Reshape(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...
Definition: base_data_layer.hpp:32
virtual void Backward_cpu(const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
Using the CPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...
Definition: base_data_layer.hpp:35
Provides base for data layers that feed blobs to the Net.
Definition: base_data_layer.hpp:21
virtual void Forward_cpu(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)=0
Using the CPU device, compute the layer output.
Definition: internal_thread.hpp:19
virtual void Backward_gpu(const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
Using the GPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...
Definition: base_data_layer.hpp:37
Definition: blocking_queue.hpp:10
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...
Definition: blob.hpp:24
virtual void LayerSetUp(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Does layer-specific setup: your layer should implement this function as well as Reshape.
Definition: base_data_layer.cpp:21