namespace caffe {
+/**
+ * @brief Abstract base class that factors out the BLAS code common to
+ * ConvolutionLayer and DeconvolutionLayer.
+ */
template <typename Dtype>
class BaseConvolutionLayer : public Layer<Dtype> {
public:
virtual void compute_output_shape();
};
+/**
+ * @brief Convolve the input with a bank of learned filters, and (optionally)
+ * add biases, treating filters and convolution parameters in the
+ * opposite sense as ConvolutionLayer.
+ *
+ * ConvolutionLayer computes each output value by dotting an input window with
+ * a filter; DeconvolutionLayer multiplies each input value by a filter
+ * elementwise, and sums over the resulting output windows. In other words,
+ * DeconvolutionLayer is ConvolutionLayer with the forward and backward passes
+ * reversed. DeconvolutionLayer reuses ConvolutionParameter for its
+ * parameters, but they take the opposite sense as in ConvolutionLayer (so
+ * padding is removed from the output rather than added to the input, and
+ * stride results in upsampling rather than downsampling).
+ */
template <typename Dtype>
class DeconvolutionLayer : public BaseConvolutionLayer<Dtype> {
public: