Solved by ptrblck in post #3 
              
              
                Are you overriding transforms somewhere in your script? 
Based on the error message it seems you are using 
import torchvision.transforms as transforms

in your script, while another line of code seems to call 
transforms = None

which would raise this error.