The size of labels was already [100] when I loaded the data.
The code is below,
transform = transforms.Compose([ transforms.ToTensor(), 
     transforms.Normalize((0.5,0.5,0.5), (0.5,0.5,0.5)),
     ])

trainset = torchvision.datasets.CIFAR10(root='./data', 
                                        train=True,download=True, 
                                        transform=transform)

testset = torchvision.datasets.CIFAR10(root='./data', 
                                       train=False,
                                       download=True, 
                                       transform=transform)

trainloader = torch.utils.data.DataLoader(trainset, 
                                          batch_size=batch_size,
                                          shuffle=True, 
                                          num_workers=2)

testloader = torch.utils.data.DataLoader(testset, 
                                         batch_size=batch_size,
                                         shuffle=False, 
                                         num_workers=2)

dataiter = iter(trainloader)
images, labels = dataiter.next()

labels.size()
# [100]