Running the code below devours all available RAM:
import numpy as np
from torchvision import transforms
transform = transforms.Compose([transforms.ToTensor(), transforms.Resize(256)])
X = np.full((1,256,256),0)
Y = transform(X)

I was making custom masks for a segmentation problem and wanted constant tensors with various values for reasons.  I don’t need to resize the thing, but I wondered why this was blowing up.  According to the docs, I don’t see a problem turning an array into a tensor and then resizing.