[Solved][PyTorch] TypeError: expected Tensor as element 0 in argument 0, but got list

Problem Today, when I was trying to use nn.Embedding() to splice and calculate sentence vectors by myself, I got an error like this on the DataLoader I prepared in advance: After studying it carefully, I found that the problem occurred when I made the DataLoader. My data was not in Tensor data type, so I … Continue reading [Solved][PyTorch] TypeError: expected Tensor as element 0 in argument 0, but got list