alibaba / GraphTranslator

GraphTranslator:Aligning Graph Model to Large Language Model for Open-ended Tasks
BSD 3-Clause "New" or "Revised" License
68 stars 12 forks source link

AttributeError: 'Tensor' object has no attribute 'coo'. Did you mean: 'cos'? #13

Open RongxuanLai opened 2 months ago

RongxuanLai commented 2 months ago

运行./data/arxiv/sample_neighbor.py脚本,报错如下:

Traceback (most recent call last):
  File "C:\Program Files (x86)\PyCharm 2023.1.4\plugins\python\helpers\pydev\pydevd.py", line 1527, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files (x86)\PyCharm 2023.1.4\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "E:\PythonProjects\GraphTranslator\data\arxiv\sample_neighbor.py", line 17, in <module>
    row = dataset[0].adj_t.coo()[0]
AttributeError: 'Tensor' object has no attribute 'coo'. Did you mean: 'cos'?

看这意思应该是稀疏矩阵转coo格式时函数调用出错,可否看看怎么改?谢谢。