A tensor became a 'list' object
Hello,I was trying to use a pretrained model “ProtBERT” on a dataset. I got this error message when the training was about to start.“***/envu/step/lib/python3.9/site-packages/transformers/tokenization_utils_base.py”, line 756, inself.data = {k: v.to(device=device) for k, v in self.data.items()}AttributeError: ‘list’ object has no attribute ‘to’However, the dataset has been converted to tensor already. Not sure why it became a ‘list’ object now. The class to prepare the dataset is hereimage1759×1142 98.8 KBI have been working on this for two days. Any suggestions would be highly appreciated. Thank you all!
2023-03-25T14:46:17Z
And this is how I call the class and start training.image1059×719 20.9 KB