Skip to content

Commit

Permalink
fix sigmoidal gate
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 6, 2021
1 parent 73fa28f commit e889fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion esbn_pytorch/esbn_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def forward(self, images):

# concat confidence to memory keys
# then weighted sum of all memory keys by attention of memory values
kx = g * (wk * torch.cat((Mk, ck), dim = -1)).sum(dim = 1)
kx = g.sigmoid() * (wk * torch.cat((Mk, ck), dim = -1)).sum(dim = 1)

kw, z = map_fn(rearrange, 'b d -> b () d')(kw, z)
Mk = safe_cat(Mk, kw, dim = 1)
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 = 'esbn-pytorch',
packages = find_packages(),
version = '0.0.3',
version = '0.0.4',
license='MIT',
description = 'Emergent Symbol Binding Network - Pytorch',
author = 'Phil Wang',
Expand Down

0 comments on commit e889fa8

Please sign in to comment.