For example, I have a set of 10,000 1080P pictures, I resize them to 224 in transform, batch size=20, when the program is running, do I resize 10,000 pictures to 224 at once or resize 20 img at once?
train_transform = transforms.Compose(
        [transforms.RandomHorizontalFlip(), transforms.RandomCrop(224), transforms.ToTensor(),
         transforms.Normalize(mean, std)])

This question is raised because I have 200,000 1080P pictures. If I use 200 of them to train the network, there is no problem, but if I use these 200,000 pictures for training, the graphics card memory will be insufficient.