Skip to content

Commit

Permalink
fix mask and heads issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Aug 23, 2021
1 parent 15e72e5 commit 2f1fb7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions invariant_point_attention/invariant_point_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def forward(

if exists(mask):
mask = rearrange(mask, 'b i -> b i ()') * rearrange(mask, 'b j -> b () j')
mask = repeat(mask, 'b i j -> (b h) i j', h = h)
mask_value = max_neg_value(attn_logits)
attn_logits = attn_logits.masked_fill(~mask, mask_value)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'invariant-point-attention',
packages = find_packages(),
version = '0.1.2',
version = '0.1.4',
license='MIT',
description = 'Invariant Point Attention',
author = 'Phil Wang',
Expand Down

0 comments on commit 2f1fb7c

Please sign in to comment.