From d03acd09dd141a7564257864dd68387b6a5a639b Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Mon, 15 Nov 2021 15:02:57 +0100
Subject: [PATCH] Adjust model filenames.

---
 climax/main/downscale_bootstrap.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/climax/main/downscale_bootstrap.py b/climax/main/downscale_bootstrap.py
index 36a0d47..56c6587 100644
--- a/climax/main/downscale_bootstrap.py
+++ b/climax/main/downscale_bootstrap.py
@@ -158,26 +158,26 @@ if __name__ == '__main__':
     for i in range(BOOTSTRAP):
 
         # add suffix for n'th bootstrap
-        state_file = state_file.parent.joinpath(state_file.name.replace(
+        model = state_file.parent.joinpath(state_file.name.replace(
             state_file.suffix, '_{}.pt'.format(i + 1)))
 
         # check if target dataset already exists
-        target_ds = target.joinpath(state_file.name.replace(
-            state_file.suffix, '.nc'))
+        target_ds = target.joinpath(model.name.replace(
+            model.suffix, '.nc'))
         if target_ds.exists() and not OVERWRITE:
             LogConfig.init_log('{} already exists.'.format(target_ds))
             continue
 
         # load pretrained model
-        if state_file.exists() and not OVERWRITE:
+        if model.exists() and not OVERWRITE:
             # load pretrained network
-            net, _ = Network.load_pretrained_model(state_file, NET)
+            net, _ = Network.load_pretrained_model(model, NET)
         else:
             # initialize network and optimizer
             LogConfig.init_log('Initializing network and optimizer.')
 
             # instanciate network
-            net = NET(state_file, inputs, outputs, filters=FILTERS)
+            net = NET(model, inputs, outputs, filters=FILTERS)
 
             # initialize optimizer
             optimizer = OPTIM(net.parameters(), **OPTIM_PARAMS)
-- 
GitLab