Confused by pytorch embeding layer

I have a word index tensor, it was converted to python list type after I pass it to an embedding layer! What’s the problem?

It’s my fault 0.0, there is a bug in my code