Trying to downsample a batch of normalized image tensor but failed to get it work with transforms.Scale or PIL’s resize. Finally get it worked by :

LRTrans = transforms.Compose([
transforms.Scale(opt.imageSize // 4, Image.BICUBIC),
transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
])
torch.FloatTensor(LRTrans(Image.fromarray(
real_cpu.mul(0.5).add(0.5).mul(255).byte()[i].transpose(0, 2).transpose(0, 1).numpy())).numpy())

Is there a better way to do this?