发布于 2022-01-08 23:51:55
我们可以使用标识matrix E作为自节点,对邻居节点使用1-E。就像在下面,
E = torch.eye(adjacentMatrix.size(0), dtype=torch.float)
output = torch.matmul(adjacentMatrix* E, (torch.matmul(input,Q))) + torch.matmul(adjacentMatrix * (1 - E), (torch.matmul(input,W)))Q和W在这里是可以学习的
https://stackoverflow.com/questions/70553781
复制相似问题