Caffe
deconv_layer.hpp
1 #ifndef CAFFE_DECONV_LAYER_HPP_
2 #define CAFFE_DECONV_LAYER_HPP_
3 
4 #include <vector>
5 
6 #include "caffe/blob.hpp"
7 #include "caffe/layer.hpp"
8 #include "caffe/proto/caffe.pb.h"
9 
10 #include "caffe/layers/base_conv_layer.hpp"
11 
12 namespace caffe {
13 
28 template <typename Dtype>
30  public:
31  explicit DeconvolutionLayer(const LayerParameter& param)
32  : BaseConvolutionLayer<Dtype>(param) {}
33 
34  virtual inline const char* type() const { return "Deconvolution"; }
35 
36  protected:
37  virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
38  const vector<Blob<Dtype>*>& top);
39  virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
40  const vector<Blob<Dtype>*>& top);
41  virtual void Backward_cpu(const vector<Blob<Dtype>*>& top,
42  const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom);
43  virtual void Backward_gpu(const vector<Blob<Dtype>*>& top,
44  const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom);
45  virtual inline bool reverse_dimensions() { return true; }
46  virtual void compute_output_shape();
47 };
48 
49 } // namespace caffe
50 
51 #endif // CAFFE_DECONV_LAYER_HPP_
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
virtual void Forward_cpu(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Using the CPU device, compute the layer output.
Definition: deconv_layer.cpp:25
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.
Abstract base class that factors out the BLAS code common to ConvolutionLayer and DeconvolutionLayer...
Definition: base_conv_layer.hpp:18
virtual const char * type() const
Returns the layer type.
Definition: deconv_layer.hpp:34
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_...
Convolve the input with a bank of learned filters, and (optionally) add biases, treating filters and ...
Definition: deconv_layer.hpp:29
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: deconv_layer.cpp:43
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...
Definition: blob.hpp:24