Skip to content

Commit

Permalink
[Feature] Add mhspmm to speed up GAT (#234)
Browse files Browse the repository at this point in the history
* new multihead kernel

* new gat layer

* update

* mhspmm complete

* Modify GATLayer and fix bugs

* fix bugs

* fix bugs in tests

Co-authored-by: fishmingyu <fishmingyu@github.com>
Co-authored-by: THINK2TRY <48679723+THINK2TRY@users.noreply.github.com>
  • Loading branch information
3 people authored May 27, 2021
1 parent bb25aa4 commit 9f2404f
Show file tree
Hide file tree
Showing 16 changed files with 1,855 additions and 1,425 deletions.
8 changes: 2 additions & 6 deletions cogdl/models/agc/daegc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ def __init__(self, num_features, hidden_size, embedding_size, num_heads, dropout
self.embedding_size = embedding_size
self.dropout = dropout
self.num_clusters = num_clusters
self.att1 = GATLayer(
num_features, hidden_size, dropout=dropout, alpha=0.2, nhead=num_heads, concat=True, fast_mode=False
)
self.att2 = GATLayer(
hidden_size * num_heads, embedding_size, dropout=dropout, alpha=0.2, nhead=1, concat=False, fast_mode=False
)
self.att1 = GATLayer(num_features, hidden_size, dropout=dropout, alpha=0.2, nhead=num_heads, concat=True)
self.att2 = GATLayer(hidden_size * num_heads, embedding_size, dropout=dropout, alpha=0.2, nhead=1, concat=False)
self.cluster_center = None

def get_trainer(self, task, args):
Expand Down
Loading

0 comments on commit 9f2404f

Please sign in to comment.