mace
mace copied to clipboard
Add support for Upsample op in CAFFE
Currently it's possible to simulate UpSample
op in CAFFE using a deconvolution layer, but this supports only a bilinear kind of resizing of the image. Instead we can implement a real UpSample
op with nearest neighbor algorithm and exploit the fact that nearest neighbor algorithm is already implemented in MACE (but not properly wired).
Using resize_nearest_neighbor
instead of deconvolution
improves image upsampling speed by 2-4x in my tests.