This upsampling is a Kronecker product 2 with a matrix of ones. Unfortunately, torch does not have an implementation of it. If you are not dependent on the GPU it might be faster to do it with numpy:
import numpy as np
import torch
from torch.nn.functional import avg_pool2d

image = torch.arange(16, dtype=torch.float).view(4, 4)

kernel_size = 2
stride = 2

image_pooled = image.view(1, 1, *image.size())
image_pooled = avg_pool2d(image_pooled, kernel_size=kernel_size, stride=stride)
image_pooled = image_pooled.squeeze()

image_blured = image_pooled.numpy()
image_blured = np.kron(image_blured, np.ones(image_blured.shape))
image_blured = torch.from_numpy(image_blured)

print(image_blured)