Graph-U-Nets icon indicating copy to clipboard operation
Graph-U-Nets copied to clipboard

批训练问题

Open Joazs opened this issue 3 years ago • 1 comments

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

Joazs avatar Mar 13 '23 02:03 Joazs

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.

HongyangGao avatar Mar 13 '23 06:03 HongyangGao