Solved by ptrblck in post #2 
              
              
                You could use: 
x = torch.randn(32, 1, 3, 3)
transform = transforms.Compose([
    transforms.ToPILImage(),
    transforms.Resize(size=24),
    transforms.ToTensor()
])
x = [transform(x_) for x_ in x]
torchvision.utils.save_image(x, 'test.png')