mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Fix default for weight_decay as per table3 ViT-B/16 trained on ImageNet-21k
This commit is contained in:
1 parent
bf6f266417
commit
944534fe7b
1 file changed
+1
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user