Skip to content

Commit

Permalink
Update blackjax/adaptation/adjusted_mclmc_adaptation.py
Browse files Browse the repository at this point in the history
Co-authored-by: Junpeng Lao <[email protected]>
  • Loading branch information
reubenharry and junpenglao authored Jan 1, 2025
1 parent aa98579 commit a75589b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions blackjax/adaptation/adjusted_mclmc_adaptation.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,11 @@ def step(iteration_state, weight_and_key):
zero_prevention=mask,
)

if fix_L:
params = params._replace(
step_size=mask * step_size + (1 - mask) * params.step_size,
)

else:
params = params._replace(
step_size=mask * step_size + (1 - mask) * params.step_size,
)
if not fix_L:
params = params._replace(
step_size=mask * step_size + (1 - mask) * params.step_size,
L=mask * (params.L * (step_size / params.step_size))
+ (1 - mask) * params.L,
)
Expand Down

0 comments on commit a75589b

Please sign in to comment.