Skip to content

Commit 514b7c9

Browse files
committed
missing absolute positional embedding
1 parent 5892fe3 commit 514b7c9

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ sampled_images.shape # (4, 3, 128, 128)
8888
## Todo
8989

9090
- [ ] experiment with <a href="https://github.com/lucidrains/bidirectional-cross-attention/issues">bidirectional cross attention</a>
91+
- [ ] add ability to use 2d sinusoidal pos emb, from simple vit paper
9192

9293
## Citations
9394

rin_pytorch/rin_pytorch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ def forward(
362362

363363
patches = self.to_patches(x)
364364

365+
patches = patches + self.pos_emb
366+
365367
# the recurrent interface network body
366368

367369
for _ in range(self.depth):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'RIN-pytorch',
55
packages = find_packages(exclude=[]),
6-
version = '0.0.1',
6+
version = '0.0.2',
77
license='MIT',
88
description = 'RIN - Recurrent Interface Network - Pytorch',
99
author = 'Phil Wang',

0 commit comments

Comments
 (0)