Skip to content

Commit

Permalink
this is how we fixed certain parameters during inference
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Nov 19, 2024
1 parent 217c79b commit 549095f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bpd/pipelines/image_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def pipeline_interim_samples_one_galaxy(
rng_key: PRNGKeyArray,
true_params: dict[str, float],
target_image: Array,
fixed_draw_kwargs: dict,
*,
initialization_fnc: Callable,
draw_fnc: Callable,
Expand All @@ -167,7 +168,8 @@ def pipeline_interim_samples_one_galaxy(
k1, k2 = random.split(rng_key)

init_position = initialization_fnc(k1, true_params=true_params, data=target_image)
_loglikelihood = partial(loglikelihood, draw_fnc=draw_fnc, background=background)
_draw_fnc = partial(draw_fnc, **fixed_draw_kwargs)
_loglikelihood = partial(loglikelihood, draw_fnc=_draw_fnc, background=background)
_logprior = partial(logprior, sigma_e=sigma_e_int)

_logtarget = partial(
Expand Down

0 comments on commit 549095f

Please sign in to comment.