How to Solve NameError: name 'Dataset' is not defined -- torch.utils.data

Solution: Import the 'Dataset' module

# Add the following line to the top of your code
from torch.utils.data import Dataset

 

For more information:
torch.utils.data Dataset