Skip to content

Commit

Permalink
fix bug for post attention layer norms when using emb factorization
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 4, 2020
1 parent e86dffc commit 0444ff4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 = 'sinkhorn_transformer',
packages = find_packages(exclude=['examples']),
version = '0.11.0',
version = '0.11.1',
license='MIT',
description = 'Sinkhorn Transformer - Sparse Sinkhorn Attention',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion sinkhorn_transformer/sinkhorn_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def __init__(self, num_tokens, dim, max_seq_len, depth, heads = 8, dim_head = No
if emb_dim != dim:
self.sinkhorn_transformer = ProjectInOut(self.sinkhorn_transformer, emb_dim, dim, project_out =(not return_embeddings))

self.norm = nn.LayerNorm(dim)
self.norm = nn.LayerNorm(emb_dim)
self.to_logits = identity if return_embeddings else nn.Linear(emb_dim, num_tokens)

def forward(self, x, **kwargs):
Expand Down

0 comments on commit 0444ff4

Please sign in to comment.