can't convert a given np.ndarray to a tensor 字符串类别先建立稳定编码

这个报错意思是 numpy 数组里面包含字符串文本,不能直接转成 PyTorch tensor,正确做法是先给字符串类别做稳定编码,把字符串映射成固