MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / _data_transforms_cifar10

Function _data_transforms_cifar10

AutoML/darts-master/cnn/utils.py:62–79  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

60
61
62def _data_transforms_cifar10(args):
63 CIFAR_MEAN = [0.49139968, 0.48215827, 0.44653124]
64 CIFAR_STD = [0.24703233, 0.24348505, 0.26158768]
65
66 train_transform = transforms.Compose([
67 transforms.RandomCrop(32, padding=4),
68 transforms.RandomHorizontalFlip(),
69 transforms.ToTensor(),
70 transforms.Normalize(CIFAR_MEAN, CIFAR_STD),
71 ])
72 if args.cutout:
73 train_transform.transforms.append(Cutout(args.cutout_length))
74
75 valid_transform = transforms.Compose([
76 transforms.ToTensor(),
77 transforms.Normalize(CIFAR_MEAN, CIFAR_STD),
78 ])
79 return train_transform, valid_transform
80
81
82def count_parameters_in_MB(model):

Callers

nothing calls this directly

Calls 1

CutoutClass · 0.70

Tested by

no test coverage detected