Torchvision.transforms has no attribute of ColorJitter?

Hey guys,

I used torchvision.transforms.ColorJitter to do data augmentation. The codes are as below:
data_transform = transforms.Compose([
transforms.Normalize([pixel_mean, pixel_mean, pixel_mean], [pixel_std, pixel_std, pixel_std])
But it gave the error of 'AttributeError: ‘module’ object has no attribute ‘ColorJitter’'
My Pytorch version is 0.2.0_4. Any help? Thanks in advance

The method is not available in 0.2 (note the version selector on top left of doc page.) It should be in 0.3 and master according to the doc.

1 Like

Thanks @SimonW. It works after upgrading Pytorch to 0.3

1 Like