mirror of
https://github.com/AntoineHX/smart_augmentation.git
synced 2025-05-04 12:10:45 +02:00
Ajout option Weight decay / Nesterov sur inner opt
This commit is contained in:
parent
65e67addf6
commit
383f63c7b8
3 changed files with 26 additions and 12 deletions
|
@ -972,7 +972,11 @@ class Augmented_model(nn.Module):
|
|||
|
||||
self._opt_param=opt_param
|
||||
#Inner Opt
|
||||
inner_opt = torch.optim.SGD(self._mods['model']['original'].parameters(), lr=opt_param['Inner']['lr'], momentum=opt_param['Inner']['momentum']) #lr=1e-2 / momentum=0.9
|
||||
inner_opt = torch.optim.SGD(self._mods['model']['original'].parameters(),
|
||||
lr=opt_param['Inner']['lr'],
|
||||
momentum=opt_param['Inner']['momentum'],
|
||||
weight_decay=opt_param['Inner']['decay'],
|
||||
nesterov=opt_param['Inner']['nesterov']) #lr=1e-2 / momentum=0.9
|
||||
|
||||
#Validation data
|
||||
self._dl_val=dl_val
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue