List type has no attribute ‘to’
print(type(label)) >>> class ‘list’
for data, label in train loader:
data=data.to(device)
>>label=label.to(device)
AttributeError: ‘tuple’ object has no attribute ‘to’
I also tried previous solutions but no success please help