Caffe
|
Fills a Blob with coefficients for bilinear interpolation. More...
#include <filler.hpp>
Public Member Functions | |
BilinearFiller (const FillerParameter ¶m) | |
virtual void | Fill (Blob< Dtype > *blob) |
Public Member Functions inherited from caffe::Filler< Dtype > | |
Filler (const FillerParameter ¶m) | |
Additional Inherited Members | |
Protected Attributes inherited from caffe::Filler< Dtype > | |
FillerParameter | filler_param_ |
Fills a Blob with coefficients for bilinear interpolation.
A common use case is with the DeconvolutionLayer acting as upsampling. You can upsample a feature map with shape of (B, C, H, W) by any integer factor using the following proto.
Please use this by replacing {{}}
with your values. By specifying num_output: {{C}} group: {{C}}
, it behaves as channel-wise convolution. The filter shape of this deconvolution layer will be (C, 1, K, K) where K is kernel_size
, and this filler will set a (K, K) interpolation kernel for every channel of the filter identically. The resulting shape of the top feature map will be (B, C, factor * H, factor * W). Note that the learning rate and the weight decay are set to 0 in order to keep coefficient values of bilinear interpolation unchanged during training. If you apply this to an image, this operation is equivalent to the following call in Python with Scikit.Image.