DEV Community

NirmalSankalana
NirmalSankalana

Posted on

Answer: AttributeError : 'tuple' has no attribute 'to'

I also got the same error when I was training an Image classification model with a reference-style image dataset. Here I implemented a Custom Dataset Class by extending from torch.utils.data import Dataset class. Same as you I haven't encoded my target labels and they are just a tuple of class…

Top comments (0)