Skip to content

Commit

Permalink
update DHCF
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanfeng97 committed Dec 27, 2022
1 parent 2b25d32 commit 7293527
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dhg/models/hypergraphs/dhcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def forward(
u_embs = hg_ui.smoothing_with_HGNN(u_embs)
i_embs = hg_iu.smoothing_with_HGNN(i_embs)
g_embs = torch.cat([u_embs, i_embs], dim=0)
sum_embs = F.leaky_relu(self.W_gc[_idx](g_embs) + g_embs, negative_slope=0.2)
sum_embs = F.leaky_relu(self.W_gc[_idx](g_embs) + all_embs, negative_slope=0.2)
#==========================================================================================

bi_embs = all_embs * g_embs
Expand Down
10 changes: 5 additions & 5 deletions dhg/nn/convs/hypergraphs/dhcf_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def forward(self, X: torch.Tensor, hg: Hypergraph) -> torch.Tensor:
X (``torch.Tensor``): Input vertex feature matrix. Size :math:`(N, C_{in})`.
hg (``dhg.Hypergraph``): The hypergraph structure that contains :math:`N` vertices.
"""
X = self.theta(X)
X_ = self.theta(X)
if self.bn is not None:
X = self.bn(X)
X = hg.smoothing_with_HGNN(X) + X
X_ = self.bn(X_)
X_ = hg.smoothing_with_HGNN(X_) + X
if not self.is_last:
X = self.drop(self.act(X))
return X
X_ = self.drop(self.act(X_))
return X_

0 comments on commit 7293527

Please sign in to comment.