We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f87d1c commit 2fa2b62Copy full SHA for 2fa2b62
setup.py
@@ -3,7 +3,7 @@
3
setup(
4
name = 'vit-pytorch',
5
packages = find_packages(exclude=['examples']),
6
- version = '0.35.6',
+ version = '0.35.7',
7
license='MIT',
8
description = 'Vision Transformer (ViT) - Pytorch',
9
long_description_content_type = 'text/markdown',
vit_pytorch/vit.py
@@ -114,7 +114,7 @@ def forward(self, img):
114
x = self.to_patch_embedding(img)
115
b, n, _ = x.shape
116
117
- cls_tokens = repeat(self.cls_token, '1 n d -> b n d', b = b)
+ cls_tokens = repeat(self.cls_token, '1 1 d -> b 1 d', b = b)
118
x = torch.cat((cls_tokens, x), dim=1)
119
x += self.pos_embedding[:, :(n + 1)]
120
x = self.dropout(x)
0 commit comments