Skip to content

Commit

Permalink
Merge pull request #149 from bokveizen/patch-3
Browse files Browse the repository at this point in the history
Update attention.py
  • Loading branch information
fedebotu authored Apr 5, 2024
2 parents 8bbd5d6 + 0557b16 commit 7e514c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rl4co/models/zoo/ham/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def forward(self, q, h=None, mask=None):
q: queries (batch_size, n_query, input_dim)
h: data (batch_size, graph_size, input_dim)
mask: mask (batch_size, n_query, graph_size) or viewable as that (i.e. can be 2 dim if n_query == 1)
Mask should contain 1 if attention is not possible (i.e. mask is negative adjacency)
Mask should contain 1 if attention is not possible (i.e. mask is negative adjacency)
"""
if h is None:
h = q # compute self-attention
Expand Down

0 comments on commit 7e514c4

Please sign in to comment.