diff --git a/climax/main/downscale_bootstrap.py b/climax/main/downscale_bootstrap.py index 36a0d47e2c5eb859b85f6285b4e6335fff405c8c..56c6587ec8b95d940b7f20f9001ec4a4419f29d7 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)