Skip to content

Commit

Permalink
Change Gaussian example to 20D.
Browse files Browse the repository at this point in the history
  • Loading branch information
alicjapolanska committed Sep 27, 2024
1 parent 9726ce2 commit 19406d4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/gaussian_nondiagcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def run_example(
if flow_type == "RealNVP":
epochs_num = 5
elif flow_type == "RQSpline":
epochs_num = 3
# epochs_num = 3
epochs_num = 100

# Beginning of path where plots will be saved
save_name_start = "examples/plots/" + flow_type
Expand All @@ -112,7 +113,7 @@ def run_example(

# Spline params
n_layers = 5
n_bins = 5
n_bins = 16
hidden_size = [32, 32]
spline_range = (-10.0, 10.0)

Expand Down Expand Up @@ -314,6 +315,7 @@ def run_example(

plt.show()

# Save out realisations for violin plot.
evidence_inv_summary[i_realisation, 0] = ev.evidence_inv
evidence_inv_summary[i_realisation, 1] = ev.evidence_inv_var
evidence_inv_summary[i_realisation, 2] = ev.evidence_inv_var_var
Expand Down Expand Up @@ -347,11 +349,11 @@ def run_example(
hm.logs.setup_logging()

# Define parameters.
ndim = 5
ndim = 21
nchains = 100
samples_per_chain = 5000
flow_str = "RealNVP"
# flow_str = "RQSpline"
# flow_str = "RealNVP"
flow_str = "RQSpline"
np.random.seed(10) # used for initializing covariance matrix

hm.logs.info_log("Non-diagonal Covariance Gaussian example")
Expand Down

0 comments on commit 19406d4

Please sign in to comment.