Solved by chenyuntc in post #2 
              
              
                No, Tensor/numpy/int/float/etc would be ok, but string is not ok in this case---- you need to convert to num(e.g. word1->1 word2->2) 

Actually this is not an issue about pytorch. For NLP problem like this, you need to process your data using tools like token2id(convert word to digit), pad sequence…