ValueError:维度太多';str';pytorch中的python

ValueError:维度太多';str';pytorch中的python,pytorch,lstm,torch,valueerror,Pytorch,Lstm,Torch,Valueerror,我不断得到错误: ValueError:维度“str”太多 我附上我的colab笔记本来看看。我还没有在网上找到任何能帮助我解决问题的东西 链接: 我在Jupyter笔记本上也看到了这个错误。我可以用以下简单的代码复制它: Input: tensor(['a']) Output: --------------------------------------------------------------------------- ValueError

我不断得到错误:

ValueError:维度“str”太多

我附上我的colab笔记本来看看。我还没有在网上找到任何能帮助我解决问题的东西

链接:

我在Jupyter笔记本上也看到了这个错误。我可以用以下简单的代码复制它:

Input:
tensor(['a'])

Output: 
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-55-3bdb0dbfafc2> in <module>
----> 1 tensor(['a'])
...(stacktrace)...

ValueError: too many dimensions 'str'
Input:
tensor([1])

Output: 
tensor([1])