Solved by Nikronic in post #2 
              
              
                Hi, 
You have typo here, it must be transform not transforms. I mean s is the problem. 

Based on your definition in below line 

transform is composed object and transforms is the PyTorch package itself. 
In the CIFAR10 example, you are using transform! 

Good luck