Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

邻接矩阵 #12

Open
11051911 opened this issue Sep 14, 2023 · 3 comments
Open

邻接矩阵 #12

11051911 opened this issue Sep 14, 2023 · 3 comments

Comments

@11051911
Copy link

你好,可以提供一下创建邻接矩阵的代码吗?

@yueliu1999
Copy link
Owner

你好,感谢关注~。创建邻接矩阵的话只需要将自己的数据里面的邻接矩阵保存为numpy的npy文件再load即可。

@11051911
Copy link
Author

你好,感谢关注~。创建邻接矩阵的话只需要将自己的数据里面的邻接矩阵保存为numpy的npy文件再load即可。

代码中的邻接矩阵的值只能是1或者是整数吗
Traceback (most recent call last):
File "F:\论文中的程序\DCRN-main\DCRN_pretrain\pretrain_ae\main.py", line 97, in
x, y, adj = load_graph_data(args.name, show_details=True)
File "F:\论文中的程序\DCRN-main\DCRN_pretrain\pretrain_ae\main.py", line 57, in load_graph_data
for i in range(max(label)+1):
TypeError: 'numpy.float64' object cannot be interpreted as an integer

@yueliu1999
Copy link
Owner

邻接矩阵里面的值不一定只能是1或整数。

你现在的这个错误看起来像是label的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants