AttributeError: 'Compose' object has no attribute 'Compose' (in Pytorch 0.2.1)
This is the block of code where am getting this error:

train_transforms = transforms.Compose([transforms.RandomRotation(30),
                                       transforms.RandomResizedCrop(224),
                                       transforms.RandomHorizontalFlip(),
                                       transforms.ToTensor(),
                                       transforms.Normalize([0.5, 0.5, 0.5], 
                                                            [0.5, 0.5, 0.5])])


I've tried updating my torchvision but had no luck!

The problem is that you have a variable called transforms after from torchvision import transforms which has a compose of a certain type. This override the transform you import from the torchvison. Therefore when you run the above code it calls the transforms which is a variable not the one from torchvision module. 

It is advisable to rename the variable or if you are using jupyter notebook run the cell where you import transforms before running the cell with the code above.
