vision-transformer-pytorch icon indicating copy to clipboard operation
vision-transformer-pytorch copied to clipboard

fine-tune imagenet21k_ViT-B_16.npz with pre_logits?

Open 4vicii opened this issue 11 months ago • 0 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')

4vicii avatar Mar 10 '24 14:03 4vicii