Skip to content

Commit

Permalink
fix how config's optimizer creates optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
saleml committed Apr 5, 2023
1 parent 5b15d01 commit a6ffcdf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/configs/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ def get_params(
"params": [
val
for key, val in parametrization.parameters.items()
if key != "logZ"
if "logZ" not in key
],
"lr": self.lr,
}
]
if "logZ" in parametrization.parameters:
params.append(
{"params": [parametrization.parameters["logZ"]], "lr": self.lr_Z}
{
"params": [
val
for key, val in parametrization.parameters.items()
if "logZ" in key
],
"lr": self.lr_Z,
}
)
else:
self.lr_Z = None
Expand Down

0 comments on commit a6ffcdf

Please sign in to comment.