Based on the error message it seems that labels is indeed a tuple, while you expect it to be a tensor. You can check it by printing its type before calling the to() operation during the training and see, if this type changes in a specific iteration:
print(type(labels))
labels = labels.to(device)