From c62eb4ab10fbd6f2d7976ce408717e2e178dc22e Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Fri, 15 Oct 2021 09:29:11 +0200
Subject: [PATCH] Adjust regular expression.

---
 Scripts/downscale.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Scripts/downscale.sh b/Scripts/downscale.sh
index 27e4473..b318cbf 100644
--- a/Scripts/downscale.sh
+++ b/Scripts/downscale.sh
@@ -5,13 +5,14 @@ conda activate climax
 cd ~/git/climax
 
 # loss functions
-LOSS=(L1Loss BernoulliGammaLoss BernoulliWeibullLoss MSELoss)
+# LOSS=(L1Loss BernoulliGammaLoss BernoulliWeibullLoss MSELoss)
+LOSS=(L1Loss BernoulliGammaLoss MSELoss)
 
 # wet day thresholds to test
 # WET_DAY_THRESHOLDS=(0 0.5 1 2 3 5)
 
 # weight decay values to test
-LAMBDA=(0 0.0000001 0.000001 0.00001 0.0001 0.001 0.01 0.1 1)
+LAMBDA=(0 0.000001 0.00001 0.0001 0.001 0.01 1)
 
 # iterate over loss functions
 for loss in ${LOSS[@]}; do
@@ -26,9 +27,9 @@ for loss in ${LOSS[@]}; do
     # iterate over weight decay values
     for lambda in ${LAMBDA[@]}; do
         # change weight regularization in configuration
-        sed -i "s/LAMBDA\s*=.*/LAMBDA=$lambda/" ./climax/main/config.py
-
-        # run downscaling
+	sed -i "s/'weight_decay':.*/'weight_decay': $lambda/" ./climax/main/config.py
+       
+       	# run downscaling
         # python climax/main/downscale.py
         python climax/main/downscale_train.py
         python climax/main/downscale_infer.py
-- 
GitLab