i think that looks fine, the task is so easy (CIFAR is so incredibly small) that it doesn’t even really utilize the one CPU. I don’t think this creates a bigger bottleneck than spreading it across workers.
Also, the resizing op is so cheap that it is maybe too fast to draw any conclusions from that. Could you run this on a larger dataset? You could use UTKFace or CACD or sth that is simple to download. Or, you could simply resize the CIFAR images and save them in higher res to disk (maybe 500x500). I think the data loading of the image and reading it into the tensor would be the main task where I would suspect bottlenecks.
In any case, another thing to try (which probably doesn’t make a difference) is not to use pinned memory (btw. it always made things substantially slower than not using it; don’t necessarily expect a correlation with your issue, but maybe just a simple thing to try).