Ask questionsFeature Request: Add Pixel Unshuffle
I would like to propose the addition of an inverse operation for the current PixelShuffle function. We have been researching temporally connected feature cascades and have had a lot of success in hierarchically mixing residual information through this function.
The core operation is essentially the following: For feature map fm with batchsize b, channels c, downsize ratio of r, and original height and width of h,w, do:
out_channel = c*(r**2) out_h = h//r out_w = w//r fm_view = fm.contiguous().view(b, c, out_h, r, out_w, r) fm_prime = fm_view.permute(0,1,3,5,2,4).contiguous().view(b,out_channel, out_h, out_w)
cc @albanD @mruberry @fmassa @vfdev-5
Answer questions PiotrDabkowski
@alykhantejani Why should unshuffle qualify for the contrib while shuffle for the main repo? It is quite weird to implement just the upsample logic without the downsample counterpart. Lots of recent work relies on the unshuffle so it would be quite beneficial to put it just next to pixel_shuffle so that people do now waste time looking for it.