Skip to content

Commit

Permalink
update andrew examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnWangDataAnalyst committed Feb 6, 2024
1 parent e60a5b2 commit 72ff8f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/eg002r__multimodal_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
paramsBOLD = BOLD_Params()
paramsBOLD.to(device)

paramsNode.J = par((0.15 * np.ones(num_regions)), fit_par = True, asLog = True) #This is a parameter that will be updated during training
paramsNode.J = par((0.15 * np.ones(num_regions)), (0.15 * np.ones(num_regions)), (0.01 * np.ones(num_regions)), fit_par = True, asLog = True) #This is a parameter that will be updated during training
paramsNode.to(device)

# %%
Expand Down Expand Up @@ -155,7 +155,7 @@ def loss(self, simData, empData = None, returnLossComponents = False):
if returnLossComponents:
return totalLoss, (S_E_mean_loss.item(), S_I_mean_loss.item(), EEG_PSD_loss.item(), EEG_FC_loss.item(), BOLD_PSD_loss.item(), BOLD_FC_loss.item())
else:
return totalLoss
return totalLoss, totalLoss

ObjFun = mmObjectiveFunction()

Expand Down
6 changes: 3 additions & 3 deletions examples/eg005r__gpu_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
# Create a RWW Params
paramsNode = ParamsRWWEI2(num_regions)

paramsNode.J = par((0.15 * np.ones(num_regions)), fit_par = True, asLog = True) #This is a parameter that will be updated during training
paramsNode.G = par(torch.tensor(1.0), None, None, True, False, False)
paramsNode.sig = par(torch.tensor(0.01), None, None, True, False, False)
paramsNode.J = par((0.15 * np.ones(num_regions)),0.15 * np.ones(num_regions),0.01 * np.ones(num_regions), fit_par = True, asLog = True) #This is a parameter that will be updated during training
paramsNode.G = par(1,1,0.1, True)
paramsNode.sig = par(np.log(0.01),np.log(0.01), 0.1, True, True)
paramsNode.to(device)

#Create #EEG Params
Expand Down

0 comments on commit 72ff8f4

Please sign in to comment.