I have attempted to use unsqueeze and squeeze to pretend the tensor is actually two dimensional. The bilinear filter works with the specified size but the nearest neighbor one does not (I used nn.upsample2d instead of F.upsample with size set to (x,1) and it reports that the aspect ratio isn’t respected in the nearest neighbor case). I was hoping to be able to copy the values to double the size, not interpolate them between adjacent values.
I will try using F.upsample instead of the normal 2d upsampling module and see if it makes a difference.