I use the most recent version of torchvision (v0.20) and I still get the same error “TypeError: ‘builtin_function_or_method’ object is not iterable”
import torchvision.transforms as t
train_trans = t.Compose([
    t.ToTensor(),
    t.RandomCrop(224),
    t.ColorJitter(
        brightness = 0.4,
        contrast = 0.4,
        saturation = 0.4),
    t.RandomHorizontalFlip(),
    t.Normalize(mean=[0.485, 0.456, 0.406],
                std=[0.229, 0.224, 0.225]),
])

I notice it is the transforms.ToTensor() function that is causing the issue. My workaround is to position ToTensor function just before transforms.Normalize and all the other transform functions before it.

import torchvision.transforms as t
train_trans = t.Compose([
    t.RandomCrop(224),
    t.ColorJitter(
        brightness = 0.4,
        contrast = 0.4,
        saturation = 0.4),
    t.RandomHorizontalFlip(),
    t.ToTensor(),
    t.Normalize(mean=[0.485, 0.456, 0.406],
                std=[0.229, 0.224, 0.225]),
])