Just to add on this thread - the linked PyTorch tutorial on picture loading is kind of confusing. The author does both import skimage import io, transform, and from torchvision import transforms, utils.
For transform, the authors uses a resize() function and put it into a customized Rescale class.  For transforms, the author uses the transforms.Compose function to organize two transformations. But they are from two different modules!
To add to the confusion, torchvision transforms also has its own API called Resize() which is the same name with the one in skimage module.