Skip to content

Commit

Permalink
correctly dropout positions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 31, 2021
1 parent d6c7c92 commit 923522d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions enformer_pytorch/enformer_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def forward(self, x):
content_logits = einsum('b h i d, b h j d -> b h i j', q + self.rel_content_bias, k)

positions = get_positional_embed(n, self.num_rel_pos_features, device)
positions = self.pos_dropout(positions)
rel_k = self.to_rel_k(positions)

rel_k = rearrange(rel_k, 'n (h d) -> h n d', h = h)
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 = 'enformer-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.9',
version = '0.0.10',
license='MIT',
description = 'Enformer - Pytorch',
author = 'Phil Wang',
Expand Down

0 comments on commit 923522d

Please sign in to comment.