📅  最后修改于: 2022-03-11 14:46:53.101000             🧑  作者: Mango
from torchvision import transforms as transforms
transform = transforms.Compose([
transforms.RandomCrop(32, padding=4), #å
åå¨å¡«å
0ï¼å¨æå¾åéæºè£åªæ32*32
transforms.RandomHorizontalFlip(), #å¾åä¸åçæ¦ç翻转ï¼ä¸åçæ¦çä¸ç¿»è½¬
transforms.RandomRotation((-45,45)), #éæºæ转
transforms.ToTensor(),
transforms.Normalize((0.4914, 0.4822, 0.4465), (0.229, 0.224, 0.225)), #R,G,Bæ¯å±çå½ä¸åç¨å°çåå¼åæ¹å·®
])