Skip to content

Commit e889fa8

Browse files
committed
fix sigmoidal gate
1 parent 73fa28f commit e889fa8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

esbn_pytorch/esbn_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def forward(self, images):
7979

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

8484
kw, z = map_fn(rearrange, 'b d -> b () d')(kw, z)
8585
Mk = safe_cat(Mk, kw, dim = 1)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'esbn-pytorch',
55
packages = find_packages(),
6-
version = '0.0.3',
6+
version = '0.0.4',
77
license='MIT',
88
description = 'Emergent Symbol Binding Network - Pytorch',
99
author = 'Phil Wang',

0 commit comments

Comments
 (0)