Skip to content

Commit

Permalink
fix weakref
Browse files Browse the repository at this point in the history
  • Loading branch information
ordabayevy committed Jul 7, 2023
1 parent 0292aad commit f7efd39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tapqir/models/hmm.py
Expand Up @@ -670,4 +670,6 @@ def z_sample(self, num_samples):
def compute_params(self, CI):
params = super().compute_params(CI)
params["z_trans"] = pyro.param("z_trans").cpu()
# Remove weakrefs in preparation for pickling.
params["z_trans"].__dict__.pop("unconstrained", None)
return params

0 comments on commit f7efd39

Please sign in to comment.