Skip to content

Commit 7293527

Browse files
committed
update DHCF
1 parent 2b25d32 commit 7293527

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dhg/models/hypergraphs/dhcf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def forward(
7777
u_embs = hg_ui.smoothing_with_HGNN(u_embs)
7878
i_embs = hg_iu.smoothing_with_HGNN(i_embs)
7979
g_embs = torch.cat([u_embs, i_embs], dim=0)
80-
sum_embs = F.leaky_relu(self.W_gc[_idx](g_embs) + g_embs, negative_slope=0.2)
80+
sum_embs = F.leaky_relu(self.W_gc[_idx](g_embs) + all_embs, negative_slope=0.2)
8181
#==========================================================================================
8282

8383
bi_embs = all_embs * g_embs

dhg/nn/convs/hypergraphs/dhcf_conv.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ def forward(self, X: torch.Tensor, hg: Hypergraph) -> torch.Tensor:
4646
X (``torch.Tensor``): Input vertex feature matrix. Size :math:`(N, C_{in})`.
4747
hg (``dhg.Hypergraph``): The hypergraph structure that contains :math:`N` vertices.
4848
"""
49-
X = self.theta(X)
49+
X_ = self.theta(X)
5050
if self.bn is not None:
51-
X = self.bn(X)
52-
X = hg.smoothing_with_HGNN(X) + X
51+
X_ = self.bn(X_)
52+
X_ = hg.smoothing_with_HGNN(X_) + X
5353
if not self.is_last:
54-
X = self.drop(self.act(X))
55-
return X
54+
X_ = self.drop(self.act(X_))
55+
return X_

0 commit comments

Comments
 (0)