Skip to content

Commit 6ae6a3a

Browse files
authored
cleanup
1 parent 827300b commit 6ae6a3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vit_pytorch/vit_with_keel_post_ln.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def forward(self, img):
189189

190190
x = self.transformer(x)
191191

192-
if self.mlp_head is None:
192+
if not exists(self.mlp_head):
193193
return x
194194

195195
x = x.mean(dim = 1) if self.pool == 'mean' else x[:, 0]

0 commit comments

Comments
 (0)