InferencetrainingAI commited on
Commit
359e021
1 Parent(s): 67d226a

Update ser.py

Browse files

optimize and update params

Files changed (1) hide show
  1. ser.py +13 -0
ser.py CHANGED
@@ -62,6 +62,19 @@ class SearchMood:
62
 
63
 
64
  return(torch.tensor([samp_loss*-1]))
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
 
67
 
 
62
 
63
 
64
  return(torch.tensor([samp_loss*-1]))
65
+
66
+
67
+
68
+ def search_compose(self):
69
+ for d in range(100):
70
+ optimizer = optim.Adagrad((self.prior_component[0], self.prior_component[1]))
71
+ optimizer.step(closure=self.loss_fn)
72
+ state_dict = optimizer.state_dict()
73
+ params = state_dict['param_groups'][0]['params']
74
+
75
+ self.prior_component[0] = params[0]
76
+ self.prior_component[1] = params[1]
77
+
78
 
79
 
80