Thanks. So should I use: transforms.Compose([transforms.ToPILImage(), transforms.Pad(2), transforms.ToTensor(), … ?
I get this error when I do it: AssertionError: pic should be Tensor or ndarray
When I switch ToPILImage() and ToTensor(), I get the previous error.