Thanks for your message. I solved with this (see below), but the link you provided it is very useful since I have to rotate the image and do a flip. Any suggestion to avoid creating a whole custom transform?
transform=transforms.Compose([
                               transforms.Resize(image_size),
                               transforms.CenterCrop(image_size),
                               transforms.ToTensor(),
                               transforms.Lambda(lambda x: x.repeat(3,1,1)),
                               transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
                              
                              ])