Hi! According to Cifar10 Example 1, the dataset and dataloader pipeline is:
transform = transforms.Compose(
    [transforms.RandomCrop(224),
     transforms.RandomHorizontalFlip(p=0.3)]
)

batch_size = 4

trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
                                        download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=batch_size,
                                          shuffle=True, num_workers=2)

The transform process is done inside torchvision.datasets.CIFAR10, so one image will have one transforms() call, and later dataloader will concat them.
Do you think it is a good practice to do
# pass this transform function to torchvision.datasets.CIFAR10, instead of transform.Compose()
transform = torch.nn.Sequential(
    transforms.RandomCrop(224),
    transforms.RandomHorizontalFlip(p=0.3),
).to('cuda')

# edit inside torchvision.datasets.CIFAR10
def __getitem__(self, index: int) -> Tuple[Any, Any]:
        ...
        if self.transform is not None:
            img = self.transform(transforms.functional.to_tensor(img))
            
        ...
# Run our code as normal