Skip to content

Commit

Permalink
fix an issue that was fixed by deepmind in their official repository g…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jun 1, 2022
1 parent 9edf7f3 commit dcb5751
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enformer_pytorch/modeling_enformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_positional_features_gamma(positions, features, seq_len, stddev = None, s
rate = mean / stddev ** 2
probabilities = gamma_pdf(positions.float().abs()[..., None], concentration, rate)
probabilities = probabilities + eps
outputs = probabilities / torch.amax(probabilities)
outputs = probabilities / torch.amax(probabilities, dim = -1, keepdim = True)
return outputs

def get_positional_embed(seq_len, feature_size, device):
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
name = 'enformer-pytorch',
packages = find_packages(exclude=[]),
include_package_data = True,
version = '0.4.5',
version = '0.4.6',
license='MIT',
description = 'Enformer - Pytorch',
author = 'Phil Wang',
author_email = 'lucidrains@gmail.com',
long_description_content_type = 'text/markdown',
url = 'https://github.com/lucidrains/enformer-pytorch',
keywords = [
'artificial intelligence',
Expand Down

0 comments on commit dcb5751

Please sign in to comment.