Fix default for weight_decay as per table3 ViT-B/16 trained on ImageNet-21k

This commit is contained in:
AlessandroMiola committed 2023-01-16 20:19:53 +01:00
1 parent bf6f266417
commit 944534fe7b
1 file changed
+1 -1
+1 -1
View File
@@ -3546,7 +3546,7 @@
"optimizer = torch.optim.Adam(params=vit.parameters(), \n",
" lr=1e-3, # Base LR from Table 3 \n",
" betas=(0.9, 0.999), # default values but also mentioned in ViT paper section 4.1 (Training & Fine-tuning)\n",
" weight_decay=0.1) # from the ViT paper section 4.1 (Training & Fine-tuning)\n",
" weight_decay=0.03) # from the ViT paper section 4.1 (Training & Fine-tuning)\n",
"\n",
"# Setup the loss function for multi-class classification\n",
"loss_fn = torch.nn.CrossEntropyLoss()\n",