summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergio Guadarrama <sguada@gmail.com>2014-02-13 18:35:28 -0800
committersguada <sguada@gmail.com>2014-02-17 10:32:36 -0800
commit617c0165cf6dbfffdb05b4822399216ad1e59c2f (patch)
tree15cb618e2c7c0e5074ba7a346766c1664e868500 /include
parent54cd881488400dcb8b870eb0d4b2fc27dcddbf4b (diff)
downloadcaffeonacl-617c0165cf6dbfffdb05b4822399216ad1e59c2f.tar.gz
caffeonacl-617c0165cf6dbfffdb05b4822399216ad1e59c2f.tar.bz2
caffeonacl-617c0165cf6dbfffdb05b4822399216ad1e59c2f.zip
Added input_layer to set of layers and to factory
Diffstat (limited to 'include')
-rw-r--r--include/caffe/vision_layers.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/caffe/vision_layers.hpp b/include/caffe/vision_layers.hpp
index 82e52cd5..37343524 100644
--- a/include/caffe/vision_layers.hpp
+++ b/include/caffe/vision_layers.hpp
@@ -339,6 +339,33 @@ class DataLayer : public Layer<Dtype> {
Blob<Dtype> data_mean_;
};
+template <typename Dtype>
+class InputLayer : public Layer<Dtype> {
+ public:
+ explicit InputLayer(const LayerParameter& param)
+ : Layer<Dtype>(param) {}
+ virtual ~InputLayer();
+ virtual void SetUp(const vector<Blob<Dtype>*>& bottom,
+ vector<Blob<Dtype>*>* top);
+
+ protected:
+ virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
+ vector<Blob<Dtype>*>* top);
+ virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
+ vector<Blob<Dtype>*>* top);
+ virtual Dtype Backward_cpu(const vector<Blob<Dtype>*>& top,
+ const bool propagate_down, vector<Blob<Dtype>*>* bottom);
+ virtual Dtype Backward_gpu(const vector<Blob<Dtype>*>& top,
+ const bool propagate_down, vector<Blob<Dtype>*>* bottom);
+
+ int datum_channels_;
+ int datum_height_;
+ int datum_width_;
+ int datum_size_;
+ bool biasterm_;
+ bool has_data_mean_;
+};
+
template <typename Dtype>
class SoftmaxLayer : public Layer<Dtype> {