You would have to put the keys in the dict:
trainset = torchvision.datasets.CIFAR10(root='./data' , train=True,
                                  download=True , transform = data_transforms['train'])
testset = torchvision.datasets.CIFAR10(root='./data' , train=False,
                                  download=True , transform = data_transforms['val'])