How to Solve NameError: name 'transforms' is not defined -- torchvision

Solution: Import the 'transforms' module

To Solve the error, add the following line to the top of your code.

from torchvision import transforms

 

For more information:
Python torchvision transforms