From 3beff33ff4c4c4882b2caba54748f70e8555e5c1 Mon Sep 17 00:00:00 2001 From: ValentinHirschi Date: Wed, 24 Jul 2024 23:59:03 +0200 Subject: [PATCH] Fix h-function rust tests. --- src/test_resources/default_tests_config.yaml | 5 +++-- src/utils.rs | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/test_resources/default_tests_config.yaml b/src/test_resources/default_tests_config.yaml index c96ab219..d8d89117 100644 --- a/src/test_resources/default_tests_config.yaml +++ b/src/test_resources/default_tests_config.yaml @@ -30,7 +30,8 @@ Integrator: n_increase: 10000 n_max: 10000000000 integrated_phase: real - learning_rate: 1.5 + discrete_dim_learning_rate: 1.5 + continuous_dim_learning_rate: 1.5 train_on_avg: false show_max_wgt_info: true max_prob_ratio: 0.01 @@ -57,4 +58,4 @@ subtraction: function: poly_exponential sigma: 1.0 enabled_dampening: true - power: null \ No newline at end of file + power: null diff --git a/src/utils.rs b/src/utils.rs index 04a3799b..208fa4ee 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1636,10 +1636,10 @@ pub fn h( ), }; - println!("normalisation: {}", normalisation); - println!("t: {}", t); - println!("sig: {}", sig); - println!("power: {:?}", power); + // println!("normalisation: {}", normalisation); + // println!("t: {}", t); + // println!("sig: {}", sig); + // println!("power: {:?}", power); let prefactor = match power { @@ -1647,7 +1647,7 @@ pub fn h( Some(p) => (&t / &sig).powi(-(p as i32)) / normalisation, }; - println!("prefactor: {}", prefactor); + // println!("prefactor: {}", prefactor); prefactor * (F::::from_f64(2_f64) - ((t.square()) / (sig.square()) + t.one()) / (t / sig)).exp() }