Compare commits

...

1 Commits

Author SHA1 Message Date
Phil Wang
5028e10908 fix small bug 2021-04-29 15:27:06 -07:00
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -162,11 +162,11 @@ class Transformer(nn.Module):
Residual(PreNorm(dim, FeedForward(dim, mlp_mult, dropout = dropout)))
]))
def forward(self, x):
for local_attn, ff, global_attn, ff in self.layers:
for local_attn, ff1, global_attn, ff2 in self.layers:
x = local_attn(x)
x = ff(x)
x = ff1(x)
x = global_attn(x)
x = ff(x)
x = ff2(x)
return x
class TwinsSVT(nn.Module):