let windowed tokens exchange information across heads a la talking heads prior to pointwise attention in sep-vit

This commit is contained in:
Phil Wang
2022-03-31 15:22:24 -07:00
parent 5d4c798949
commit d93cd84ccd
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name = 'vit-pytorch',
packages = find_packages(exclude=['examples']),
version = '0.32.1',
version = '0.32.2',
license='MIT',
description = 'Vision Transformer (ViT) - Pytorch',
author = 'Phil Wang',

View File

@@ -103,7 +103,7 @@ class DSSA(nn.Module):
nn.LayerNorm(dim_head),
nn.GELU(),
Rearrange('b h n c -> b (h c) n'),
nn.Conv1d(inner_dim, inner_dim * 2, 1, groups = heads),
nn.Conv1d(inner_dim, inner_dim * 2, 1),
Rearrange('b (h c) n -> b h n c', h = heads),
)