Skip to content

Commit

Permalink
change var to var_inv
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnWangDataAnalyst committed Jan 11, 2024
1 parent 14b3495 commit cb89132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions whobpyt/run/modelfitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ def train(self, u, empRec,
var = getattr(self.model.params, par_name)
if (var.fit_par):
trackedParam[par_name] = var.value().detach().cpu().numpy().copy()
if var.fit_hyper:

trackedParam[par_name + "_prior_mean"] = var.prior_mean.detach().cpu().numpy().copy()
trackedParam[par_name + "_prior_var"] = var.prior_var.detach().cpu().numpy().copy()
trackedParam[par_name + "_prior_mean"] = var.prior_mean.detach().cpu().numpy().copy()
trackedParam[par_name + "_prior_var_inv"] = var.prior_var_inv.detach().cpu().numpy().copy()
for key, value in self.model.state_dict().items():
if key not in exclude_param:
trackedParam[key] = value.detach().cpu().numpy().ravel().copy()
Expand Down

0 comments on commit cb89132

Please sign in to comment.