on the master branch, we now have F.upsample that supports both 2D and 3D inputs for nearest and bilinear modes: http://pytorch.org/docs/nn.html?highlight=upsample#torch.nn.functional.upsample 329
It will be part of the next release 0.2.0