asyml / vision-transformer-pytorch

Pytorch version of Vision Transformer (ViT) with pretrained models. This is part of CASL (https://casl-project.github.io/) and ASYML project.

Home Page:https://asyml.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fine-tune imagenet21k_ViT-B_16.npz with pre_logits?

4vicii opened this issue · comments

hi , im really preciated by the work. but i have a question about "pre_logits". Did you set the "representation_size" as defualt None when you finetune imagenet21k_ViT-B_16.npz with imagenet 1k?

i mean the code about models.py

if representation_size is not None:
  x = nn.Dense(x, representation_size, name='pre_logits')
  x = nn.tanh(x)
else:
  x = IdentityLayer(x, name='pre_logits')