Skip to content

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

@RongxuanLai

Description

@RongxuanLai

运行./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格式时函数调用出错,可否看看怎么改?谢谢。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions