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

批训练问题 #25

Open
Joazs opened this issue Mar 13, 2023 · 1 comment
Open

批训练问题 #25

Joazs opened this issue Mar 13, 2023 · 1 comment

Comments

@Joazs
Copy link

Joazs commented Mar 13, 2023

您好,我这里有一批节点特征矩阵,大小为[B,N,C],B是批处理个数,N是节点个数,C是特征维度数;还有一批邻接矩阵[B,N,N]。由于我的邻接矩阵太过稠密,我在使用PYG复现的GraphUNet时显存不足,因为它是用邻接列表存储节点连接关系的。
但是现在我想使用邻接矩阵的形式,请问如何进行批训练呢?

@HongyangGao
Copy link
Owner

Try this one:
https://pytorch.org/docs/stable/generated/torch.sparse.mm.html

Change the adjacency matrix to sparse and do matrix multiplication with sparse.mm.

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