mirror of
https://github.com/AntoineHX/smart_augmentation.git
synced 2025-05-04 04:00:46 +02:00
+controle mag reg + Tests fonction mag reg
This commit is contained in:
parent
fc0fb25148
commit
534e244307
6 changed files with 45 additions and 22 deletions
|
@ -329,7 +329,7 @@ def run_dist_dataugV3(model, opt_param, epochs=1, inner_it=1, dataug_epoch_start
|
|||
|
||||
if(high_grad_track and i>0 and i%inner_it==0 and epoch>=opt_param['Meta']['epoch_start']): #Perform Meta step
|
||||
#print("meta")
|
||||
val_loss = compute_vaLoss(model=model, dl_it=dl_val_it, dl=dl_val) + model['data_aug'].reg_loss()
|
||||
val_loss = compute_vaLoss(model=model, dl_it=dl_val_it, dl=dl_val) + model['data_aug'].reg_loss(opt_param['Meta']['reg_factor'])
|
||||
#print_graph(val_loss) #to visualize computational graph
|
||||
val_loss.backward()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue